16 January 2002 Operating Systems Read: Nutt, Chapter 1 Introduction ------------ What operating systems do you know about? DOS/Windows BSD/Linux/Solaris/etc. MacOS, BeOS others: PalmOS, WinCE still others: VMS, Amiga, OS/2, Exec8, RMS, ... Typical layered design: application (possibly split application/language runtime support) system software - part common resources (e.g., C library functions, window system, DBMS) can also be called "middleware" part of which is the OS - the kernel hardware What is the OS kernel supposed to give to you? bridge between application and hardware abstraction of the hardware resource management: processor, memory, communication, devices should be safe (secure) and efficient Why study the OS? Easier to see how to use the system Enables you to write efficient code learn to design an OS realize: the OS is overhead ----------- Administrivia for cs256 and cs456. MW 2-3:15, CSB 601 Me: murphy@cs.rochester.edu office hours still in limbo my research area is mobile computing TA: Bill Scherer scherer@cs.rochester.edu Office Hours: Tuesday 1-2 and Friday 4-5 Topics: Intro/History/Hardware/Overview Device Management Process Management Scheduling Synchronization Memory Management File Systems Security Networks and Distributed Systems Modern OSs: mobile, power management, embedded Syllabus online: http://www.cs.rochester.edu/u/murphy/456/ Notes will be posted AFTER class. These notes are not a substitute for taking notes in class. Coming to class is not a substitute for reading the book. Reading the book is not a substitute for coming to class. Textbook: Gary Nutt's Operating Systems, A Modern Perspective some "useful" online resources (link from class homepage) this and other texts on reserve in the library Newsgroup: ur.cs456 for both 256 and 456 Grading: 10% quizzes 17% midterm 23% final 50% projects Quizzes: Every 2-3 weeks a homework assignment will be handed out. Homework will not be collected, but for every homework handed out, there will be one quiz based on it. On the announced day, you will be asked to solve, in class (10 minutes) and without notes/book, one of the homework questions (chosen randomly). Together, the quiz grades will make up xx% of your semester grade. Projects: projects posted on web page, announced on newsgroup 4-5 projects. Work in groups of 1 or 2. no late projects mostly C/C++ more details when first project posted (probably next week) Lab access -- Marty will be here Monday at 2 256 vs. 456. Same lectures, Same quizzes Same exams (but more questions for 456) Same projects (but extensions for 456) --------------------- Today: history/overview from simplistic OS to real-time OS strategies for Resource management: processor (time), memory (space), communication (time), devices (space/time) SEE FIGURE 1.6, page 29 Early systems: single user, no files, static programming (switches/wires), biggest issue was utilization OS: simplify device programming Batch Systems input: cards (today: files) output: tape (today: files) no user intervention, except queuing of jobs Problem: card readers slow, CPU idle Solution: overlap I/O with processing buffer at the input and output points (read ahead and store output) OS takes from front of input queue, must not overflow output queue multiprogrammed batch systems What is multiprogramming? loading multiple programs into memory and time multiplexing them onto the processor Not just a single queue of jobs, but a job pool any job in the pool can execute, overhead for swapping job does not wait for I/O of another job OS needs to: protect programs from one another track what programs are waiting for now need mem mgmt, mem protection, scheduling - jobs compete for resources batch systems: not interactive Timesharing systems (multi-tasking): enable many users on the same system each user gets virtual machine need: equitable processor sharing - quick response switch jobs frequently - regardless of I/O requirements need more of: memory: virtual memory security - files/terminal access/memory inter-process communication: synchronization deadlock prevention Personal Computers - cheap cpu no longer need to share for multiple users early DOS - single task, no protection Win 3 - evolved to share for single user's multiple tasks multiprogrammed, slow switching, on user demand little security NT - multitasking need: networking to enable collaboration MultiProcessor systems improve speed/reliability duplication not linear speedup - contention for resources Process control and Real-time Systems embedded processors controlling a single task simple OS, no sharing, just abstraction of hardware sometimes no identifiable OS real-time - provides guaranteed response time for requests must be predictable, more than priorities in control systems, power systems, aircraft, robotics hard real time - late results are worthless tight bounds on all operations: data retrieval computation need hardware guarantees cannot be time-shared, so eliminate some OS complexities hard to build soft real time results have some value if late priority given to critical tasks often mixed with other OS useful for multimedia, virtual reality, basic QoS Networking/distributed systems early systems - connect point to point (2 machines) developed into connected networks, LAN, WAN challenges: no shared clock or memory heterogeneous want: resource sharing speedup (crypto cracking, SETI) reliability (fault tolerance, e.g., DNS) communication Client-Server is popular Peer-to-peer is growing in popularity