Chapter 1CS 1550:Introduction to Operating SystemsProf. Ahmed [email protected]://www.cs.pitt.edu/~amer/cs1550Chapter 12CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Class outline Introduction, concepts, review & historicalperspective Processes Synchronization Scheduling Deadlock Memory management, address translation, andvirtual memory Operating system management of I/O File systems Security & protection Distributed systems (as time permits)Chapter 13CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Overview: Chapter 1 What is an operating system, anyway? Operating systems history The zoo of modern operating systems Review of computer hardware Operating system concepts Operating system structure User interface to the operating system Anatomy of a system callChapter 14CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)What is an operating system? A program that runs on the “raw” hardware and supports Resource Abstraction Resource Sharing Abstracts and standardizes the interface to the user acrossdifferent types of hardware Virtual machine hides the messy details which must be performed Manages the hardware resources Each program gets time with the resource Each program gets space on the resource May have potentially conflicting goals: Use hardware efficiently Give maximum performance to each userChapter 15CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Operating system timeline First generation: 1945 – 1955 Vacuum tubes Plug boards Second generation: 1955 – 1965 Transistors Batch systems Third generation: 1965 – 1980 Integrated circuits Multiprogramming Fourth generation: 1980 – present Large scale integration Personal computers Next generation: ??? Systems connected by high-speed networks? Wide area resource management?Chapter 16CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)First generation: direct input Runonejobatatime Enter it into the computer (might require rewiring!) Run it Record the results Problem: lots of wasted computer time! Computer was idle during first and last steps Computers were very expensive! Goal: make better use of an expensive commodity:computer timeChapter 17CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Second generation: batch systems Bring cards to 1401 Read cards onto input tape Put input tape on 7094 Perform the computation, writing results to output tape Put output tape on 1401, which prints outputChapter 18CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)$END$RUN$LOADStructure of a typical 2nd generation job$FORTRAN$JOB, 10,6610802, ETHAN MILLERFORTRANprogramData forprogramChapter 19CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Spooling Original batch systems used tape drives Later batch systems used disks for buffering Operator read cards onto disk attached to the computer Computer read jobs from disk Computer wrote job results to disk Operator directed that job results be printed from disk Disks enabled simultaneous peripheral operation on-line (spooling) Computer overlapped I/O of one job with execution ofanother Better utilization of the expensive CPU Still only one job active at any given timeChapter 110CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)OperatingsystemThird generation: multiprogramming Multiple jobs in memory Protected from one another Operating system protectedfrom each job as well Resources (time, hardware)split between jobs Still not interactive User submits job Computer runs it User gets results minutes(hours, days) laterJob 1Job 2Job 3MemorypartitionsChapter 111CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Timesharing Multiprogramming allowed several jobs to be activeat one time Initially used for batch systems Cheaper hardware terminals -> interactive use Computer use got much cheaper and easier No more “priesthood” Quick turnaround meant quick fixes for problemsChapter 112CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Types of modern operating systems Mainframe operating systems: MVS Server operating systems: FreeBSD, Solaris Multiprocessor operating systems: Cellular IRIX Personal computer operating systems: Windows,Unix Real-time operating systems: VxWorks Embedded operating systems Smart card operating systems⇒ Some operating systems can fit into more than onecategoryChapter 113CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Components of a simple PCHard drivecontrollerVideocontrollerMemoryUSBcontrollerNetworkcontrollerOutsideworldCPUComputer internals(inside the “box”)Chapter 114CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)ExecuteunitExecuteunitExecuteunitExecuteunitBufferFetchunitDecodeunitFetchunitDecodeunitFetchunitDecodeunitCPU internalsPipelined CPU Superscalar CPUChapter 115CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Access latency1ns2–5 ns50 ns5ms50 sec<1KB1MB256 MB40 GB>1TBCapacityStorage pyramidRegistersCache (SRAM)Main memory (DRAM)Magnetic diskMagnetic tape Goal: really large memory with very low latency Latencies are smaller at the top of the hierarchy Capacities are larger at the bottom of the hierarchy Solution: move data between levels to create illusion of largememory with low latencyBetterBetterChapter 116CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)Disk drive structuresectorcylinderplatterspindletrackheadactuatorsurfaces Data stored on surfaces Up to two surfaces per platter One or more platters per disk Data in concentric tracks Tracks broken into sectors 256B-1KB per sector Cylinder: correspondingtracks on all surfaces Data read and written byheads Actuator moves heads Heads move in unisonChapter 117CS 1550, cs.pitt.edu (originaly modified by Ethan L. Miller and Scott A. Brandt)MemoryUser programand dataUser programand
View Full Document