1 Linux Kernel Programming Changwoo Min 2 About me • Changwoo Min • Assistant Professor at ECE @ VT • Email:
[email protected] • Office: 455 @ Durham • Homepage: https://multics69.github.io/ • Research group: https://cosmoss-vt.github.io/ 3 My research interests • Many-core performance scalability of operating system • What happen if we run Linux on 448-core machine? • Will your application run 448x faster? • Non-volatile memory systems • What happen if storage performance is becoming closer to DRAM performance? • Will your application achieve DRAM-like IO performance? • System security • How operating system should be designed to avoid security holes? 4 What is the Linux Kernel? • One of operating system kernel • e.g., Windows, FreeBSD, OSX, etc. • What does an OS do for you? • Abstract the hardware for convenience and portability • Multiplex the hardware among multiple applications • Isolate applications to contain bugs • Allow sharing among applications 5 View: layered organization • User: applications (e.g., vi and gcc) • Kernel: file system, process, etc. • Hardware: CPU, mem, disk, etc. → Interface between layers 6 View: core services • Processes • Memory • File contents • Directories and file names • Security • Many others: users, IPC, network, time, terminals, etc. → Abstraction for applications 7 Example: system calls • Interface : applications talk to an OS via system calls • Abstraction : process and file descriptor fd = open("out", 1); write(fd, "hello\n", 6); pid = fork(); 8 Why is Linux kernel interesting? • OS design deals with