VIVES Hogeschool
Operating Systems
,1. Hoofdstuk 1: Inleiding ............................................................................................ 5
1.1. Rol van het Operating System ......................................................................... 5
1.2. Operating System Geschiedenis ..................................................................... 5
1.3. Computer Hardware Review ........................................................................... 7
1.4. System Calls ................................................................................................. 9
1.5. Memory Management .................................................................................. 10
1.6. POSIX Standaard ......................................................................................... 10
1.7. Operating System Structuur .......................................................................... 11
1.8. Time Multiplexing ......................................................................................... 11
2. Hoofdstuk2: Processen en Threads ........................................................................13
2.1. Processen ................................................................................................... 13
2.2. Proces Lifecycle ........................................................................................... 14
2.3. Process States ............................................................................................. 15
2.4. IO Wait ........................................................................................................ 15
2.5. Context Switch ............................................................................................ 16
2.6. Process Control Block .................................................................................. 17
2.7. Threads ....................................................................................................... 17
2.8. Multithreaded Processes .............................................................................. 19
2.9. Pthreads (POSIX Threads) ............................................................................. 20
2.10. Thread Stack ............................................................................................... 21
3. Hoofdstuk 3: Memory Management .......................................................................22
3.1. Address Space............................................................................................. 22
3.2. Relocation Problem ..................................................................................... 22
3.3. Base and Limit Registers .............................................................................. 22
3.4. Swapping .................................................................................................... 23
3.5. Memory Management with Bitmaps and Linked Lists ...................................... 24
3.6. Compaction ................................................................................................ 25
3.7. Virtual Memory ............................................................................................ 25
3.8. MMU (Memory Management Unit) ................................................................. 25
3.9. Pages en Page Frames .................................................................................. 26
3.10. Page Tables ................................................................................................. 26
3.11. Page Faults .................................................................................................. 27
3.12. Paging vs Base-Limit .................................................................................... 28
3.13. Page Replacement Algorithms ...................................................................... 28
3.14. Working Set Theory ...................................................................................... 30
3.15. Memory Translation Oefeningen .................................................................... 30
4. Hoofdstuk 4: File Systems .....................................................................................32
4.1. Doel van Files .............................................................................................. 32
4.2. Files Loskoppeling van Proces ...................................................................... 32
4.3. File Structuren ............................................................................................. 33
, 4.4. File Inhoud .................................................................................................. 34
4.5. File Attributen .............................................................................................. 35
4.6. File Operations ............................................................................................ 36
4.7. File Pointers................................................................................................. 37
4.8. File System Organizatie ................................................................................ 38
4.9. Path Names................................................................................................. 39
4.10. Links ........................................................................................................... 40
5. Hoofdstuk 5: Input/Output ....................................................................................43
5.1. I/O Devices.................................................................................................. 43
5.2. Device Controllers ....................................................................................... 44
5.3. Memory-Mapped I/O .................................................................................... 44
5.4. Direct Memory Access (DMA) ........................................................................ 45
5.5. DMA Controller ............................................................................................ 46
5.6. Polling ......................................................................................................... 47
5.7. Interrupts .................................................................................................... 47
5.8. Interrupt Vectors .......................................................................................... 49
5.9. Interrupt Service Routine (ISR) ...................................................................... 49
5.10. Precise Interrupts ........................................................................................ 50
5.11. Apparatenbuffers (Device Buffers)................................................................. 51
5.12. Device Drivers ............................................................................................. 53
5.13. Interrupt Request (IR) Prioriteiten .................................................................. 55
6. Hoofdstuk 6: Deadlocks ........................................................................................57
6.1. Wat is een Deadlock? ................................................................................... 57
6.2. Deadlock Scenario ....................................................................................... 57
6.3. Resources in Deadlocks ............................................................................... 57
6.4. Preemptable vs Nonpreemptable Resources ................................................. 57
6.5. Coffman’s 4 Voorwaarden ............................................................................ 58
6.6. Resource Allocation Graph ........................................................................... 59
6.7. Deadlock Detection and Recovery ................................................................ 59
6.8. Deadlock Avoidance .................................................................................... 61
6.9. Banker’s Algorithm ....................................................................................... 61
6.10. Max/Need Matrix .......................................................................................... 62
6.11. Unsafe State ................................................................................................ 63
6.12. Hold and Wait Prevention ............................................................................. 64
6.13. Ostrich Algorithm ......................................................................................... 65
6.14. Deadlock Prevention vs Avoidance vs Detection ............................................. 66
7. Hoofdstuk 7: Virtualisatie en de Cloud ...................................................................67
7.1. Virtualisatie - Wat en Waarom? ..................................................................... 67
7.2. Wat is Virtualisatie? ...................................................................................... 67
7.3. Waarom Virtualisatie? .................................................................................. 67
Liam Debels VIVES Hogeschool Pagina 3 van 114
, 7.4. Historiek en Ontstaan .................................................................................. 68
7.5. Hypervisors Type 1 en Type 2......................................................................... 69
7.6. Popek & Goldberg Voorwaarden .................................................................... 70
7.7. Privileged Instructions .................................................................................. 71
7.8. Binary Translation ........................................................................................ 71
7.9. Trap and Emulate ......................................................................................... 73
7.10. Paravirtualisatie ........................................................................................... 74
7.11. ....................................................................................................................... 75
7.12. Shadow Page Tables ..................................................................................... 76
7.13. Nested/Extended Page Tables ....................................................................... 77
7.14. Memory Deduplication ................................................................................. 78
7.15. Ballooning ................................................................................................... 79
7.16. Containers/Jails ........................................................................................... 80
7.17. VMware World Switch .................................................................................. 82
Hoofdstuk 8: Multiple Processor Systems ......................................................................84
8.1. Types van Multiple Processor Systemen......................................................... 84
8.2. Multiprocessor Hardware - UMA Architecturen............................................... 84
8.3. Multicore Chips ........................................................................................... 88
8.4. Operating System Types bij Multiprocessors .................................................. 89
8.5. Multiprocessor Synchronization .................................................................... 91
8.6. Multiprocessor Scheduling ........................................................................... 94
8.7. Omega Switching Network Oefeningen .......................................................... 98
8.8. Coherency................................................................................................... 99
8. Hoofdstuk 9: Security ......................................................................................... 100
9.1. Introductie ................................................................................................. 100
9.2. CIA Security Triad ........................................................................................ 100
9.3. Security Principles ...................................................................................... 100
9.4. Trusted Computing Base (TCB) ..................................................................... 100
9.5. Access Control ........................................................................................... 100
9.6. Formal Security Models ............................................................................... 101
9.7. Cryptography .............................................................................................. 101
9.8. Multi-Factor Authentication (MFA) ................................................................ 102
9.9. Authentication Methods .............................................................................. 102
9.10. Software Exploits ........................................................................................ 102
9.11. Hardware Exploits ....................................................................................... 102
9.12. Social Engineering ...................................................................................... 103
9.13. OS Hardening ............................................................................................. 103
9.14. Zero-Day Vulnerabilities .............................................................................. 103
9. Te kennen begrippen ........................................................................................... 104
Liam Debels VIVES Hogeschool Pagina 4 van 114