Introduction and History Sarah Diesburg Operating Systems CS
Introduction and History Sarah Diesburg Operating Systems CS 3430
What is an Operating System? 2
What is an Operating System? n A virtual machine q Hides the complexity and limitations of hardware from application programmers Applications Operating system (virtual machine) Raw machine Virtual machine interface Physical machine interface 3
For Each OS Component n There are two major design questions: q What is the hardware interface? n q The physical reality What is the application interface? n The nicer abstraction 4
Reality vs. Abstraction Reality Abstraction Multiple CPUs A single CPU Limited RAM capacity Infinite capacity Mechanical disk Memory speed access Insecure and unreliable Reliable and secure networks Many physical A single machines 5
Two General OS Functions n Standard services q q n Screen display Disk accesses Coordination among applications q Goals: correctness, efficiency, and fairness 6
Standard Services n Example: disk drive Track Sector Cylinder 7
Disk Access n Raw disk access q n write(block, len, device, track, sector); OS-level access q q lseek(file, file_size, SEEK_SET); write(file, text, len); 8
Coordination n Example: Protection q Applications should not crash one another n q Address space: all memory addresses that an application can touch Applications should not crash the OS n Dual-mode operations q q Kernel mode: anything goes User mode: an application can only access its own address space 9
Protection n Operating system exposes an interface for users – system calls q n Series of function calls native to the operating system UNIX-based systems (like Linux) expose POSIX interface q Portable Operating System Interface for Computing Environments 10
OS Implementation n Linux is written in C q q n UNIX-based operating systems are written in C q n n Lineage started in Bell Labs in 1969 Dennis Ritchie and Ken Thompson So is POSIX Why is C good for operating systems? What about Windows? 11
History Phase I: Hardware Expensive, Humans Cheap n n Hardware: mainframes OS: human operators q q Handle one job (a unit of processing) at a time Computer time wasted while operators walk around the machine room 12
OS Design Goal n Efficient use of the hardware q Batch system: collects a batch of jobs before processing them and printing out results n q Job collection, job processing, and printing out results can occur concurrently Multiprogramming: multiple programs can run concurrently n Example: I/O-bound jobs and CPU-bound jobs 13
History Phase II: Hardware Cheap, Humans Expensive n n Hardware: terminals OS design goal: more efficient use of human resources q Timesharing systems: each user can afford to own terminals to interact with machines 14
History Phase III: Hardware Very Cheap, Humans Very Expensive n n Hardware: personal computers OS design goal: allowing a user to perform many tasks at the same time q q Multitasking: the ability to run multiple programs on the same machine at the same time Multiprocessing: the ability to use multiple processors on the same machine 15
History Phase IV: Distributed Systems n n Hardware: computers with networks OS design goal: ease of resource sharing among machines q Example: Chrome OS is almost a pure, lockeddown “web thin client”, where almost all apps require the Internet 16
The Bottom Line OS designs need to adapt to changing technology 17
- Slides: 17