Roadmap › How Computers Work — CPU, Memory, OS, Processes and Threads › Module: Operating System, Processes and Threads
Lessons in this course (11)

7. What the operating system does

Basic★ Must knowLesson 7 of 11

The OS kernel sits between programs and hardware:

JobWhat it means
Process managementCreate/stop processes, schedule threads on CPU cores
Memory managementVirtual memory, paging, protection
File systemFiles, folders, permissions (NTFS, ext4)
Device drivers & I/ODisk, network, USB, GPU
NetworkingTCP/IP stack, sockets
SecurityUsers, permissions, isolation

User mode vs kernel mode: your code runs in user mode; when it needs the OS (read a file, send a packet, allocate pages) it makes a system call, the CPU switches to kernel mode, the kernel does the work and returns. System calls are relatively expensive — that's why buffering (reading 64 KB at once instead of one byte at a time) matters.