Difference between revisions of "IU:TestPage"
R.sirgalina (talk | contribs) |
R.sirgalina (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | = Advanced Linux: Understanding and programming = |
||
− | = Frontend Web Development = |
||
− | * '''Course name''': |
+ | * '''Course name''': Advanced Linux: Understanding and programming |
− | * '''Code discipline''': |
+ | * '''Code discipline''': xxxxx |
* '''Subject area''': |
* '''Subject area''': |
||
== Short Description == |
== Short Description == |
||
+ | This course covers the following concepts: The fundamental principles for `booting`; Linux Kernel: understanding, programming, debugging, contributing; Device drivers; Power management; Graphical stack overview; Userspace: understating and interaction with Kernel. |
||
− | This course covers the following concepts: The main goal of the course is to introduce modern concepts of frontend development in the industry to the listeners and give them basic knowledge and practical skills that can be helpful at their first job as a frontend developer. We will explore such topics as pages markup with HTML and CSS, writing business logic using JavaScript and TypeScript, development of Single Page Applications with modern frameworks and libraries (Angular, React, Vue), usage of relevant technologies and approaches (CSS-in-JS, GraphQL, WebSockets, Web Components, etc.).; As a participant of the course you will develop your own SPA that will interact either with the API provided by us or with the open API of any popular service.. |
||
== Prerequisites == |
== Prerequisites == |
||
Line 22: | Line 22: | ||
! Section !! Topics within the section |
! Section !! Topics within the section |
||
|- |
|- |
||
+ | | X86/Arm assembler introduction || |
||
− | | Introduction. Current state of the industry. Developer roadmap and technologies overview. || |
||
+ | # Basic assembler: registers, operations |
||
− | # Actual technologies in the industry |
||
+ | # x86 ABI reference |
||
+ | # Context switching |
||
+ | # CPU security rings |
||
|- |
|- |
||
+ | | Linux Kernel introduction || |
||
− | | Markup. HTML, CSS, DOM and styles inspector in browser. || |
||
+ | # Kernel usage |
||
− | # Basics of HTML5 |
||
+ | # Supported HW |
||
− | # Basics of CSS3 |
||
+ | # Building the kernel |
||
|- |
|- |
||
+ | | Booting the Kernel || |
||
− | | JavaScript. Syntax, data types, paradigms, specifics. || |
||
+ | # Boot Sequence |
||
− | # Code structure |
||
+ | # Device Tree |
||
− | # Variables |
||
+ | # U-boot |
||
− | # Control structures |
||
+ | # initrd/initramfs |
||
− | # Classical operators (math, comparison, logical) |
||
− | # Functions |
||
− | # Data types |
||
|- |
|- |
||
+ | | Kernel Modules || |
||
− | | JavaScript. Engine and execution environments specifics. TypeScript. || |
||
+ | # Linux device and driver model |
||
− | # Synchronous and asynchronous execution |
||
+ | # Virtual Filesystems |
||
− | # Event loop |
||
− | # Language features for asynchronous code |
||
− | # Scope and closures |
||
− | # Browser environment (DOM manipulations, events, etc.) |
||
|- |
|- |
||
+ | | Memory management || |
||
− | | React. Basics, render concepts, hooks, devtools. || |
||
+ | # Physical Memory |
||
− | # Pure React |
||
+ | # Virtual Memory |
||
− | # JSX |
||
+ | # Memory Allocation |
||
− | # Class components |
||
− | # Functional components |
||
− | # Hooks |
||
− | # React DevTools |
||
|- |
|- |
||
+ | | Threads, processes and scheduling || |
||
− | | React. Ecosystem, CSS-in-JS, routing, webpack + babel. || |
||
+ | # Thread |
||
− | # React Router |
||
+ | # Processes |
||
− | # CSS-in-JS: Styled Components, Emotion |
||
+ | # Timers |
||
− | # Other useful libraries (forms, network, animations, etc.) |
||
− | # create-react-app and other boilerplates |
||
|- |
|- |
||
+ | | Concurrent access to resources || |
||
− | | React. Applications architecture, stateless and stateful components, dumb and smart components, global state management. || |
||
+ | # Mutexes |
||
− | # Mono- vs multi-repository structure of enterprise projects |
||
+ | # Spin locks |
||
− | # Stateless and stateful components concept |
||
+ | # RW-locks |
||
− | # Dumb and smart components concept |
||
|- |
|- |
||
+ | | Kernel debugging || |
||
− | | React. Code quality, linting, testing, optimizations. || |
||
+ | # Debugging techniques |
||
− | # SonarQube for frontend projects |
||
+ | # DebugFS |
||
− | # ESLint, Prettier and settings presets for code linting and formatting |
||
+ | # Other methods overview (J-Tag etc). |
||
− | # Introduction to unit-testing of React components |
||
− | |- |
||
− | | NodeJS: JavaScript on backend, ExpressJS, NestJS, etc. || |
||
− | # NodeJS API Overview |
||
|} |
|} |
||
== Intended Learning Outcomes (ILOs) == |
== Intended Learning Outcomes (ILOs) == |
||
=== What is the main purpose of this course? === |
=== What is the main purpose of this course? === |
||
+ | The main purpose of this course is to give the students advanced knowledge of how Linux operation system boots, works and what parts it is consists of. |
||
− | After the course is completed, a student should know the basics of: |
||
=== ILOs defined at three levels === |
=== ILOs defined at three levels === |
||
Line 80: | Line 72: | ||
==== Level 1: What concepts should a student know/remember/explain? ==== |
==== Level 1: What concepts should a student know/remember/explain? ==== |
||
By the end of the course, the students should be able to ... |
By the end of the course, the students should be able to ... |
||
+ | * Principles of Operating Systems. |
||
− | * Resources that can help in furhther development of their skills |
||
+ | * Principles of bootloaders (first- /second- stage). |
||
− | * Resources that can help during the work as a frontend web developer |
||
+ | * Linux booting principles. |
||
− | * Role of frontend web-interfaces in modern systems |
||
==== Level 2: What basic practical skills should a student be able to perform? ==== |
==== Level 2: What basic practical skills should a student be able to perform? ==== |
||
By the end of the course, the students should be able to ... |
By the end of the course, the students should be able to ... |
||
+ | * Memory management in Kernel and userspace. |
||
− | * Key concepts that are laid into the basis of JavaScript |
||
+ | * Linux kernel subsustems. |
||
− | * Purpose of modern frontend frameworks |
||
+ | * Concurrent access to resources. |
||
− | * Key concepts that are laid into the React framework |
||
+ | * HW devices interaction in Linux. |
||
− | * What are the other technologies that appear in the JavaScript ecosystem |
||
+ | * Interrupt and multithreading execution. |
||
+ | * Real- and virtual- filesystems interaction. |
||
==== Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios? ==== |
==== Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios? ==== |
||
By the end of the course, the students should be able to ... |
By the end of the course, the students should be able to ... |
||
+ | * Kernel drivers design skills. |
||
− | * Perform everyday tasks of frontend web developer: |
||
+ | * Linux Kernel contribution and advanced GIT knowledge. |
||
− | * Develop view of pages and components using HTML and CSS |
||
+ | * C language low-level Kernel programming. |
||
− | * Write business logic using JavaScript and/or TypeScript |
||
+ | * C/C++ language system programming. |
||
− | * Perform HTTP requests to an API and process responses |
||
+ | * POSIX API usage. |
||
− | * Configure page appearance depending on routes |
||
+ | * Kernel and userspace debugging (including KGDB/GDB). |
||
− | * Handle HTML forms |
||
+ | * x86/ARM assembly programming. |
||
== Grading == |
== Grading == |
||
Line 107: | Line 102: | ||
! Grade !! Range !! Description of performance |
! Grade !! Range !! Description of performance |
||
|- |
|- |
||
− | | A. Excellent || |
+ | | A. Excellent || 90-100 || - |
|- |
|- |
||
− | | B. Good || |
+ | | B. Good || 75-89 || - |
|- |
|- |
||
− | | C. Satisfactory || |
+ | | C. Satisfactory || 60-74 || - |
|- |
|- |
||
− | | D. Poor || 0- |
+ | | D. Poor || 0-59 || - |
|} |
|} |
||
Line 122: | Line 117: | ||
! Activity Type !! Percentage of the overall course grade |
! Activity Type !! Percentage of the overall course grade |
||
|- |
|- |
||
− | | Labs/seminar classes || |
+ | | Labs/seminar classes || 40 |
|- |
|- |
||
− | | Interim performance assessment || |
+ | | Interim performance assessment || 10 |
|- |
|- |
||
| Exams || 50 |
| Exams || 50 |
||
Line 135: | Line 130: | ||
=== Open access resources === |
=== Open access resources === |
||
+ | * Linux Device Drivers by Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman (3rd edition) |
||
− | * Role of frontend web-interfaces in modern systems |
||
+ | * Beginning Linux Programming by Neil Matthew (4th edition) |
||
− | * What should a student be able to understand at the end of the course? |
||
+ | * Linux System Programming: Talking Directly to the Kernel and C Library by Robert Love (2nd edition) |
||
− | * Current state of the industry of frontend web development |
||
+ | * Online resources shared by instructor |
||
− | * Key concepts that are laid into the basis of JavaScript |
||
− | * Purpose of modern frontend frameworks |
||
− | * Key concepts that are laid into the React framework |
||
− | * What are the other technologies that appear in the JavaScript ecosystem |
||
− | * What should a student be able to apply at the end of the course? |
||
− | * Setup and develop basic single page application using React |
||
− | * Perform everyday tasks of frontend web developer: |
||
− | * Develop view of pages and components using HTML and CSS |
||
− | * Write business logic using JavaScript and/or TypeScript |
||
− | * Perform HTTP requests to an API and process responses |
||
− | * Configure page appearance depending on routes |
||
− | * Handle HTML forms |
||
=== Closed access resources === |
=== Closed access resources === |
||
Line 162: | Line 146: | ||
|+ Activities within each section |
|+ Activities within each section |
||
|- |
|- |
||
− | ! Learning Activities !! Section 1 !! Section 2 !! Section 3 !! Section 4 !! Section 5 !! Section 6 !! Section 7 !! Section 8 |
+ | ! Learning Activities !! Section 1 !! Section 2 !! Section 3 !! Section 4 !! Section 5 !! Section 6 !! Section 7 !! Section 8 |
|- |
|- |
||
− | | Development of individual parts of software product code |
+ | | Development of individual parts of software product code || 1 || 1 || 1 || 1 || 1 || 1 || 1 || 1 |
|- |
|- |
||
− | | Homework and group projects |
+ | | Homework and group projects || 1 || 1 || 1 || 1 || 1 || 1 || 1 || 1 |
+ | |- |
||
+ | | Midterm evaluation || 1 || 1 || 1 || 1 || 1 || 1 || 1 || 1 |
||
+ | |- |
||
+ | | Testing (written or computer based) || 1 || 1 || 1 || 1 || 1 || 1 || 1 || 1 |
||
+ | |- |
||
+ | | Discussions || 1 || 1 || 1 || 1 || 1 || 1 || 1 || 1 |
||
|} |
|} |
||
== Formative Assessment and Course Activities == |
== Formative Assessment and Course Activities == |
||
Line 178: | Line 168: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || ARM architecture is faster than x86, itn’s it? || 1 |
+ | |- |
||
+ | | Question || Why does antivirus software works in RING0? || 1 |
||
+ | |- |
||
+ | | Question || What is the main purpose of having interrupts? || 1 |
||
+ | |- |
||
+ | | Question || How-to debug anything inside interrupt context? || 1 |
||
+ | |- |
||
+ | | Question || Show the difference in x86 and ARM CPU registers. || 0 |
||
|- |
|- |
||
− | | Question || |
+ | | Question || Create `basic` atomic operations for ARM in x86 (and vice versa). || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Implement simple context switching without threads. || 0 |
|} |
|} |
||
==== Section 2 ==== |
==== Section 2 ==== |
||
Line 190: | Line 188: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || Monolithic kernel vs Micro-kernel. What is faster and why? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || How Linux works on HW without IOMMU? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Tools required for building Linux Kernel. || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Name few operations systems bases on Linux and name the difference. || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Contributing to Open Source software and Kernel. What is the difference? || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Git usage: commits, email-patches. || 0 |
+ | |- |
||
+ | | Question || Git usage: rewriting history. || 0 |
||
+ | |- |
||
+ | | Question || Building Linux Kernel for your own PC. || 0 |
||
+ | |- |
||
+ | | Question || Running new Kernel on your machine. || 0 |
||
+ | |- |
||
+ | | Question || Kernel config file location and editing. || 0 |
||
|} |
|} |
||
==== Section 3 ==== |
==== Section 3 ==== |
||
Line 208: | Line 214: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || What is the difference between BIOS and UEFI? What we prefer in nowadays? || 1 |
+ | |- |
||
+ | | Question || What is the usage for secure boot? What requirements should be met for this? || 1 |
||
|- |
|- |
||
− | | Question || |
+ | | Question || Why in x86 we do not have device tree? And why is it required for ARM platforms? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || What is the purpose of having initramfs? Can we skip that stage? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Build U-boot || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Rebuilding initramfs || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Changing boot order of your PC. Creating simple systemd service. || 0 |
|} |
|} |
||
==== Section 4 ==== |
==== Section 4 ==== |
||
Line 226: | Line 234: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || How kernel module can be compiled and used inside or outside Linux Kernel Image? || 1 |
|- |
|- |
||
− | | Question || What is the |
+ | | Question || What is the purpose of System.map file for correct Linux Kernel functionality? || 1 |
|- |
|- |
||
− | | Question || What is |
+ | | Question || What is the real requirement to have virtual filesystems in Linux Kernel? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Name few real and virtual filesystems. Briefly describe usage in real life. || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Develop and deploy simple Kernel Module outside kernel image. Dynamic Loading. || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Develop and deploy simple Kernel Module inside kernel image. || 0 |
+ | |- |
||
+ | | Question || SysFS/ DebugFS / ProcFS/ TmpFS usage || 0 |
||
|} |
|} |
||
==== Section 5 ==== |
==== Section 5 ==== |
||
Line 244: | Line 254: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || Why do we need virtual memory? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Why does Linux Kernel maps itself to every process address space? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || How does page fault handler work? || 1 |
|- |
|- |
||
− | | Question || What is |
+ | | Question || What is segmentation fault and how it handles in Linux Kernel? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Create simple allocator (myalloc/myfree). || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Create benchmark for simple allocator. || 0 |
|} |
|} |
||
==== Section 6 ==== |
==== Section 6 ==== |
||
Line 262: | Line 272: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || What is the |
+ | | Question || What is the difference between thread and process? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Can process exist without any threads? || 1 |
|- |
|- |
||
− | | Question || What |
+ | | Question || What scheduling methods does Linux Kernel has? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || What make `realtime` OS really realtime? || 1 |
|- |
|- |
||
− | | Question || What is the difference between |
+ | | Question || What is the difference between cooperative and preemptive multitasking? || 1 |
− | |} |
||
− | ==== Section 7 ==== |
||
− | {| class="wikitable" |
||
− | |+ |
||
|- |
|- |
||
+ | | Question || Implement your own threads inside app. || 0 |
||
− | ! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || Implement simple scheduler for your threading app. || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Implement timer for your app without using `real` timers. || 0 |
− | |- |
||
− | | Question || Which patterns are most wiedly used in React applications? || 1 |
||
− | |- |
||
− | | Question || What is Flux architecture? || 0 |
||
− | |- |
||
− | | Question || Why do we need any external solution for state menegement? Why can't we use the Context API or useDispatch hook? || 0 |
||
|} |
|} |
||
− | ==== Section |
+ | ==== Section 7 ==== |
{| class="wikitable" |
{| class="wikitable" |
||
|+ |
|+ |
||
Line 294: | Line 294: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || Why do we need locking structures? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Where is mutex preferred on spinlock? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Where is spinlock preferred on mutex? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Can we just write locking-free code? || 1 |
|- |
|- |
||
− | | Question || What is |
+ | | Question || What is deadlock and how it could be handled? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Implement simple locking structures. || 0 |
+ | |- |
||
+ | | Question || Implement Wait-die lock. || 0 |
||
|} |
|} |
||
− | ==== Section |
+ | ==== Section 8 ==== |
{| class="wikitable" |
{| class="wikitable" |
||
|+ |
|+ |
||
Line 312: | Line 314: | ||
! Activity Type !! Content !! Is Graded? |
! Activity Type !! Content !! Is Graded? |
||
|- |
|- |
||
− | | Question || |
+ | | Question || Name and briefly describe kernel-debugging techniques. || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || What debug levels for printk do you know and what is their usage? || 1 |
|- |
|- |
||
− | | Question || What |
+ | | Question || What other methods of Kernel debugging techniques do you know? || 1 |
|- |
|- |
||
− | | Question || Why |
+ | | Question || Why can’t we use regular GDB to debug Linux Kernel? || 1 |
|- |
|- |
||
− | | Question || |
+ | | Question || Usage of DebugFS for basic debugging || 0 |
|- |
|- |
||
− | | Question || |
+ | | Question || Usage of printk and debug levels. || 0 |
+ | |- |
||
+ | | Question || KGDB usage for Kernel debugging. || 0 |
||
|} |
|} |
||
=== Final assessment === |
=== Final assessment === |
||
'''Section 1''' |
'''Section 1''' |
||
+ | # Describe basic CPU registers and their purpose. |
||
− | |||
+ | # Describe x86 ABI. |
||
+ | # What is context switching and how does it work? |
||
+ | # Name all CPU security rings and describe security levels. |
||
+ | # Interrupts. Interrupt handler. |
||
'''Section 2''' |
'''Section 2''' |
||
+ | # Briefly describe modern OS architecture. (for ex. Linux) |
||
− | # How can you center an element inside of a div container with predefined width and height? |
||
+ | # Describe supported HW by Linux Kernel. |
||
− | # What properties of flex elements do you know? |
||
+ | # Describe contribution process to Linux Kernel. |
||
− | # How does a browser understand which CSS rule to apply in case of conflict? |
||
'''Section 3''' |
'''Section 3''' |
||
+ | # Name popular bootloaders and briefly describe the difference. |
||
− | # How does prototypical inheritance work? |
||
+ | # Describe all boot sequence starting from pushing START button. |
||
− | # What is the difference between Map and WeakMap? |
||
+ | # Describe in details the role of initrd/initramfs in booting process. |
||
− | # Why can “this” be lost in JavaScript? |
||
+ | # First userspace process. Describe how it works and why do we need SystemV/system? |
||
'''Section 4''' |
'''Section 4''' |
||
+ | # Describe Linux device and driver model |
||
− | # What are micro-tasks and macro-tasks? |
||
+ | # Real- and Virtual- filesystems. Describe in details. |
||
− | # What is the difference between bubbling and capturing? |
||
+ | # Name other Linux Kernel subsystems and their usage. |
||
− | # What is the Event delegation? |
||
'''Section 5''' |
'''Section 5''' |
||
+ | # Describe how virtual memory maps on physical memory. |
||
− | # How does React check if a component needs to be rerendered? |
||
+ | # Describe in details how TLB works. How TLB increases memory operations? |
||
− | # What is the difference between Component and PureComponent? |
||
+ | # Describe structure of page table, its location and management from OS. |
||
− | # How to emulate lifecycle methods in functional components? |
||
+ | # Describe memory allocation techniques. Describe one of them in details. |
||
'''Section 6''' |
'''Section 6''' |
||
+ | # Describe how threading works. |
||
− | # What is babel? Why do we need it? |
||
+ | # Describe pthread API usage. |
||
− | # What is better: axios or Fetch API? |
||
+ | # Describe difference between monotomic and realtime clocks. |
||
+ | # Describe scheduling strategies. Make a suggestion which one is preferred for different situations. |
||
+ | # Question 5 |
||
'''Section 7''' |
'''Section 7''' |
||
+ | # Describe mutex internals. |
||
− | # Describe the concept of stateless and stateful components |
||
− | # Describe |
+ | # Describe spin lock internals. |
+ | # Describe deadlock problem and how it could be handled. |
||
+ | # Compare different locking methods and make conclusion of which is faster and why. |
||
+ | # Question 5 |
||
'''Section 8''' |
'''Section 8''' |
||
+ | # Explain usage of debugFS in modern kernels. |
||
− | # How to emulate browser features (cookies, events, etc.) in unit tests? |
||
+ | # Describe main kernel debugging techniques. |
||
− | # Which main optimization problems in React do you know? |
||
− | # How do you test asynchronous functions? |
||
− | '''Section 9''' |
||
− | # How to make a post request in Node.js? |
||
− | # How to create a simple server in Node.js that returns Hello World? |
||
− | # What is the difference between NodeJS Environment and browser environment? |
||
− | # P.1.2.10 Section 10 |
||
− | # Section title: Technologies overview: workers, WebSockets, GraphQL, Web Components, Progressive Web Apps, etc. |
||
− | # Topics covered in this section: |
||
− | # Service Workers, Web Workers |
||
− | # WebSockets |
||
− | # GraphQL |
||
− | # Web Components |
||
− | # Progressive Web Apps |
||
− | # What forms of evaluation were used to test students’ performance in this section? |
||
− | # Typical questions for ongoing performance evaluation within this section |
||
− | # What are the concepts lying behind Web Components? |
||
− | # What are the concepts lying behind PWA? |
||
− | # What is the difference between Service Workers and Web Workers |
||
− | # Typical questions for seminar classes (labs) within this section |
||
− | # What is the difference between query and mutation in GraphQL |
||
− | # Why do we need Web Sockets? |
||
− | # Test questions for final assessment in this section |
||
=== The retake exam === |
=== The retake exam === |
||
Line 391: | Line 385: | ||
'''Section 8''' |
'''Section 8''' |
||
− | |||
− | '''Section 9''' |
Revision as of 00:26, 9 September 2022
Advanced Linux: Understanding and programming
- Course name: Advanced Linux: Understanding and programming
- Code discipline: xxxxx
- Subject area:
Short Description
This course covers the following concepts: The fundamental principles for `booting`; Linux Kernel: understanding, programming, debugging, contributing; Device drivers; Power management; Graphical stack overview; Userspace: understating and interaction with Kernel.
Prerequisites
Prerequisite subjects
Prerequisite topics
Course Topics
Section | Topics within the section |
---|---|
X86/Arm assembler introduction |
|
Linux Kernel introduction |
|
Booting the Kernel |
|
Kernel Modules |
|
Memory management |
|
Threads, processes and scheduling |
|
Concurrent access to resources |
|
Kernel debugging |
|
Intended Learning Outcomes (ILOs)
What is the main purpose of this course?
The main purpose of this course is to give the students advanced knowledge of how Linux operation system boots, works and what parts it is consists of.
ILOs defined at three levels
Level 1: What concepts should a student know/remember/explain?
By the end of the course, the students should be able to ...
- Principles of Operating Systems.
- Principles of bootloaders (first- /second- stage).
- Linux booting principles.
Level 2: What basic practical skills should a student be able to perform?
By the end of the course, the students should be able to ...
- Memory management in Kernel and userspace.
- Linux kernel subsustems.
- Concurrent access to resources.
- HW devices interaction in Linux.
- Interrupt and multithreading execution.
- Real- and virtual- filesystems interaction.
Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios?
By the end of the course, the students should be able to ...
- Kernel drivers design skills.
- Linux Kernel contribution and advanced GIT knowledge.
- C language low-level Kernel programming.
- C/C++ language system programming.
- POSIX API usage.
- Kernel and userspace debugging (including KGDB/GDB).
- x86/ARM assembly programming.
Grading
Course grading range
Grade | Range | Description of performance |
---|---|---|
A. Excellent | 90-100 | - |
B. Good | 75-89 | - |
C. Satisfactory | 60-74 | - |
D. Poor | 0-59 | - |
Course activities and grading breakdown
Activity Type | Percentage of the overall course grade |
---|---|
Labs/seminar classes | 40 |
Interim performance assessment | 10 |
Exams | 50 |
Recommendations for students on how to succeed in the course
Resources, literature and reference materials
Open access resources
- Linux Device Drivers by Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman (3rd edition)
- Beginning Linux Programming by Neil Matthew (4th edition)
- Linux System Programming: Talking Directly to the Kernel and C Library by Robert Love (2nd edition)
- Online resources shared by instructor
Closed access resources
Software and tools used within the course
Teaching Methodology: Methods, techniques, & activities
Activities and Teaching Methods
Learning Activities | Section 1 | Section 2 | Section 3 | Section 4 | Section 5 | Section 6 | Section 7 | Section 8 |
---|---|---|---|---|---|---|---|---|
Development of individual parts of software product code | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Homework and group projects | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Midterm evaluation | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Testing (written or computer based) | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Discussions | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Formative Assessment and Course Activities
Ongoing performance assessment
Section 1
Activity Type | Content | Is Graded? |
---|---|---|
Question | ARM architecture is faster than x86, itn’s it? | 1 |
Question | Why does antivirus software works in RING0? | 1 |
Question | What is the main purpose of having interrupts? | 1 |
Question | How-to debug anything inside interrupt context? | 1 |
Question | Show the difference in x86 and ARM CPU registers. | 0 |
Question | Create `basic` atomic operations for ARM in x86 (and vice versa). | 0 |
Question | Implement simple context switching without threads. | 0 |
Section 2
Activity Type | Content | Is Graded? |
---|---|---|
Question | Monolithic kernel vs Micro-kernel. What is faster and why? | 1 |
Question | How Linux works on HW without IOMMU? | 1 |
Question | Tools required for building Linux Kernel. | 1 |
Question | Name few operations systems bases on Linux and name the difference. | 1 |
Question | Contributing to Open Source software and Kernel. What is the difference? | 0 |
Question | Git usage: commits, email-patches. | 0 |
Question | Git usage: rewriting history. | 0 |
Question | Building Linux Kernel for your own PC. | 0 |
Question | Running new Kernel on your machine. | 0 |
Question | Kernel config file location and editing. | 0 |
Section 3
Activity Type | Content | Is Graded? |
---|---|---|
Question | What is the difference between BIOS and UEFI? What we prefer in nowadays? | 1 |
Question | What is the usage for secure boot? What requirements should be met for this? | 1 |
Question | Why in x86 we do not have device tree? And why is it required for ARM platforms? | 1 |
Question | What is the purpose of having initramfs? Can we skip that stage? | 1 |
Question | Build U-boot | 0 |
Question | Rebuilding initramfs | 0 |
Question | Changing boot order of your PC. Creating simple systemd service. | 0 |
Section 4
Activity Type | Content | Is Graded? |
---|---|---|
Question | How kernel module can be compiled and used inside or outside Linux Kernel Image? | 1 |
Question | What is the purpose of System.map file for correct Linux Kernel functionality? | 1 |
Question | What is the real requirement to have virtual filesystems in Linux Kernel? | 1 |
Question | Name few real and virtual filesystems. Briefly describe usage in real life. | 1 |
Question | Develop and deploy simple Kernel Module outside kernel image. Dynamic Loading. | 0 |
Question | Develop and deploy simple Kernel Module inside kernel image. | 0 |
Question | SysFS/ DebugFS / ProcFS/ TmpFS usage | 0 |
Section 5
Activity Type | Content | Is Graded? |
---|---|---|
Question | Why do we need virtual memory? | 1 |
Question | Why does Linux Kernel maps itself to every process address space? | 1 |
Question | How does page fault handler work? | 1 |
Question | What is segmentation fault and how it handles in Linux Kernel? | 1 |
Question | Create simple allocator (myalloc/myfree). | 0 |
Question | Create benchmark for simple allocator. | 0 |
Section 6
Activity Type | Content | Is Graded? |
---|---|---|
Question | What is the difference between thread and process? | 1 |
Question | Can process exist without any threads? | 1 |
Question | What scheduling methods does Linux Kernel has? | 1 |
Question | What make `realtime` OS really realtime? | 1 |
Question | What is the difference between cooperative and preemptive multitasking? | 1 |
Question | Implement your own threads inside app. | 0 |
Question | Implement simple scheduler for your threading app. | 0 |
Question | Implement timer for your app without using `real` timers. | 0 |
Section 7
Activity Type | Content | Is Graded? |
---|---|---|
Question | Why do we need locking structures? | 1 |
Question | Where is mutex preferred on spinlock? | 1 |
Question | Where is spinlock preferred on mutex? | 1 |
Question | Can we just write locking-free code? | 1 |
Question | What is deadlock and how it could be handled? | 1 |
Question | Implement simple locking structures. | 0 |
Question | Implement Wait-die lock. | 0 |
Section 8
Activity Type | Content | Is Graded? |
---|---|---|
Question | Name and briefly describe kernel-debugging techniques. | 1 |
Question | What debug levels for printk do you know and what is their usage? | 1 |
Question | What other methods of Kernel debugging techniques do you know? | 1 |
Question | Why can’t we use regular GDB to debug Linux Kernel? | 1 |
Question | Usage of DebugFS for basic debugging | 0 |
Question | Usage of printk and debug levels. | 0 |
Question | KGDB usage for Kernel debugging. | 0 |
Final assessment
Section 1
- Describe basic CPU registers and their purpose.
- Describe x86 ABI.
- What is context switching and how does it work?
- Name all CPU security rings and describe security levels.
- Interrupts. Interrupt handler.
Section 2
- Briefly describe modern OS architecture. (for ex. Linux)
- Describe supported HW by Linux Kernel.
- Describe contribution process to Linux Kernel.
Section 3
- Name popular bootloaders and briefly describe the difference.
- Describe all boot sequence starting from pushing START button.
- Describe in details the role of initrd/initramfs in booting process.
- First userspace process. Describe how it works and why do we need SystemV/system?
Section 4
- Describe Linux device and driver model
- Real- and Virtual- filesystems. Describe in details.
- Name other Linux Kernel subsystems and their usage.
Section 5
- Describe how virtual memory maps on physical memory.
- Describe in details how TLB works. How TLB increases memory operations?
- Describe structure of page table, its location and management from OS.
- Describe memory allocation techniques. Describe one of them in details.
Section 6
- Describe how threading works.
- Describe pthread API usage.
- Describe difference between monotomic and realtime clocks.
- Describe scheduling strategies. Make a suggestion which one is preferred for different situations.
- Question 5
Section 7
- Describe mutex internals.
- Describe spin lock internals.
- Describe deadlock problem and how it could be handled.
- Compare different locking methods and make conclusion of which is faster and why.
- Question 5
Section 8
- Explain usage of debugFS in modern kernels.
- Describe main kernel debugging techniques.
The retake exam
Section 1
Section 2
Section 3
Section 4
Section 5
Section 6
Section 7
Section 8