250 likes | 263 Views
This course provides an in-depth understanding of major concepts in operating systems, including threads and synchronization, virtualization and virtual machine monitors, I/O and device drivers, file systems, distributed systems, and security.
E N D
Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC http://www.cs.illinois.edu/class/cs423/ Based on slides by Sam King and Andrew S Tanenbaum
Facilites • Lab: EWS Machines • ssh –Y <netid>@remlnx.ews.illininois.edu • Virtual Machine Emulator • Qemu: http://wiki.qemu.org/Main_Page • Executable available from ~cs423/bin • Will use Linux Kernel 2.6.37 • http://www.kernel.org/
Course Objectives • Understanding Major Concepts of Operating Systems • Threads and synchronization • Virtualization and Virtual Machine Monitors • I/O and Device Drivers • File Systems • Distributed Systems • Security • Understanding of Interaction Between Hardware and Kernel • Understanding of the Layers of Abstraction and Virtualization of Operating Systems
What is an Operating System? • Most basically, what is an operating system are the main things it does?
What is an Operating System? • Software layer between hardware and application software Application Software Virtual interface Operating System Physical interface Hardware
What Does an Operating System Do? • Abstraction • Presents application with uniform, (relatively) simple access to resources • Regulation • Governs access to resources to guarantee proper use
What Does an Operating System Do? • In any OS area, ask: • What resource(s) is involved? • What is physical reality of resource? • What abstraction to present to user apps? • What protections to guarantee?
Dual Relationship Between OS and Apps • User app main program; calls kernel for services • OS main program; calls user programs as subroutines
Main Roles of OS • Illiusionist • Make resources seem better than they are • Examples? • Government • Parcel out shared resources to multiple apps in a fair, safe, efficient way • Tax: Costs CPU, Memory, • Maintains Protections • Allows good programs to just mind their own business
Why Study Operating Systems? • Some day, you may write one (or part of one) • OS concepts ant techniques common in other domains • OS is huge multi-threaded, event drive app • Designing and implementing abstractions and protections • Caching, indirection, concurrency, atomicity, … • Fun to “open the hood and look inside”
History of Operating Systems • Two major forces in OS history • Equipment was very expensive, steadily becoming cheaper • People viewed as increasingly expensive • Systems, including OS growing steadily in complexity • Original OS Structure • Simple, library of services, single “thread” operation • Gave poor utilization of system
Mainframes and Single Operator Computers • Three groups interacted with computers • Computer designers / developers configure computers for specific application • Operators collects program, runs it on the computer, collects output and returns it to the user • Programmers write programs, submits it to the operator, waits for output, looks for errors, repeat • Wastes both computer and human time
Batch Computers • Decouple Input, Execution, Output • One device reads in a collection of programs • Second device (main computer) executes program batch and outputs results to a “relatively fast” storage (magnetic tape) • Third device outputs results from tape to line feeder (basically a dot matrix printer) • Allows for parallel processing of input, execution, output • Executing multiple programs; protection starts to become an issue
Main Time Sharing • Allow multiple humans to interact at the same time • Main Idea: Human are very slow I/O • Switch / interleave other activities while waiting for human • OS much more complicated • Multiple sources of input • Multiple jobs running in the same time interval • Protection needs much more serious
Personal Computers • Computer hardware much much cheaper • Single user • Simple single threaded OS, basically library routines • No time sharing between jobs • Wait for printer • No protection • Gradually migrated to full multi-user OS
Today’s Computer • Everywhere – microwaves, sewing machines, washing machines, cars … • Single User computers: Cell phones, gaming devices, TiVo. Etc • Many start with modern complex OS (eg Linux)
Common Modern OS Architecture Applications Libraries (e.g. C runtime) User Mode Kernel Mode Machine Dependant Layer Portable OS Layer
Common Modern OS Architecture Applications Typical System/User Interaction Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer
Common Modern OS Architecture Applications Libraries (e.g. C runtime) Shared Libraries Machine Dependant Layer Portable OS Layer
Common Modern OS Architecture Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer High-level OS Abstractions (eg File System, Processes)
Common Modern OS Architecture Applications Libraries (e.g. C runtime) Machine Dependant Layer Portable OS Layer Low-level (eg process switching, register management)
Common Modern OS Architecture • OS developer need to be paranoid • Application software buggy • Hardware unreliable • Users untrustworthy (naïve / malicious) • OS developer need to be engineers • More is better • Use as much memory as possible • Faster is better • Indirections take time, users don’t like to wait
Monolithic OS Architecture Applications Libraries (e.g. C runtime) User Mode Kernel Mode Machine Dependant Layer Portable OS Layer
Alternative: Microkernel Architecture • Protection: How much, what cost? • Windows NT, Mac OS X microkernel origins • More common on embedded systems Client Process Client Process ProcessServer File Server … … Memmory Server Microkernel
Alternative: Virtual Machine Monitors • VMM like microkernel with simple interface • Performance? • VMM – Microkernel distinction increasing blurred Operating System Identical interfaces Virtual Machine Monitor Hardware