IU:TestPage
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