Example: air traffic controller

Operating Systems: Basic Concepts and History Hardware

Operating Systems: Basic Concepts and History 1 Introduction to Operating SystemsAn Operating system is the interface between the user and the ApplicationsOS as juggler: providing the illusion of a dedicated machine with infinite memory and ll tiOperating SystemHardwareVirtual Machine InterfacePhysical Machine Interface2OS as government:protecting users from each other, allocating resources efficiently and fairly, and providing secure and safe communicationOS as complex system :keeping OS design and implementation as simple as possible is the key to getting the OS to workWhat is an Operating system ?Any code that runs with the Hardware kernel bit set An abstract virtual machine A set of abstractions that simplify application design Files instead of bytes on a disk Files instead of bytes on a diskCore OS services, written by pros Processes, process scheduling Address spaces Device control ~30% of Linux source code.

Would games that ran on MS-DOSv1 work well today? Efficiency 6 ¾Share limited or expensive physical resources. ¾Provide protection. Computer Architecture & Processes CPU - the processor that performs the actual computation 7 ... Ope at g Syste. Multiprogramming ...

Tags:

  System, Syste

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Operating Systems: Basic Concepts and History Hardware

1 Operating Systems: Basic Concepts and History 1 Introduction to Operating SystemsAn Operating system is the interface between the user and the ApplicationsOS as juggler: providing the illusion of a dedicated machine with infinite memory and ll tiOperating SystemHardwareVirtual Machine InterfacePhysical Machine Interface2OS as government:protecting users from each other, allocating resources efficiently and fairly, and providing secure and safe communicationOS as complex system :keeping OS design and implementation as simple as possible is the key to getting the OS to workWhat is an Operating system ?Any code that runs with the Hardware kernel bit set An abstract virtual machine A set of abstractions that simplify application design Files instead of bytes on a disk Files instead of bytes on a diskCore OS services, written by pros Processes, process scheduling Address spaces Device control ~30% of Linux source code.

2 Basis of stability and securityDevice drivers written by whoever Software run in kernel to manages a particular vendor s3 Software run in kernel to manages a particular vendor s Hardware Homer Simpson doll with USB ~70% of Linux source code OS is extensible Drivers are the biggest source of OS instabilityWhat is an Operating system ?For any OS area (CPU scheduling, file systems, memory management), begin by asking two questions What s the Hardware interface? (The Physical Reality) What is the application interface? (The Nicer Interface for What is the application interface? (The Nicer Interface for programmer producivity)Key questions: Why is the application interface defined the way it is? Should we push more functionality into applications, the OS, or the Hardware ? What are the tradeoffs between programmability, complexity, and flexibility?)

3 4flexibility? Operating system FunctionsService provider Provide standard facilities File system Standard librariesWi dt Window system ..Coordinator: three aspects Protection: prevent jobs from interfering with each other Communication: enable jobs to interact with each other Resource management: facilitate sharing of resources across systems are everywhere Singlefunction devices (embedded controllers Nintendo)5 Single-function devices (embedded controllers, Nintendo, ..) OS provides a collection of standard services Sometimes OS/middleware distinction is blurry Multi-function/application devices (workstations and servers) OS manages application interactionsWhy do we need Operating systems?Convenience Provide a high-level abstraction of physical resources. Make Hardware usable by getting rid of warts & specifics Make Hardware usable by getting rid of warts & specifics.

4 Enable the construction of more complex software systems Enable portable code. MS-DOS version 1 boots on the latest 3+ GHz Pentium. Would games that ran on MS-DOSv1 work well today?Efficiency6y Share limited or expensive physical resources. Provide Architecture & ProcessesCPU -the processor that performs the actual computation 7 CPU the processor that performs the actual computation I/O devices - terminal, disks, video board, printer, etc. Memory - RAM containing data and programs used by the CPU system bus - the communication medium between the CPU, memory, and peripheralsEvolution of Operating SystemsWhy do Operating systems change? Key functions: Hardware abstraction and coordination Principle: Design tradeoffs change as technology computing systems from 1981 and 2007 Comparing computing systems from 1981 and 200719812007 FactorMIPS157,00057,000$/SPECInt$100K$25 0,000 DRAM size128KB2GB16,000 Disk size10MB1TB100,000 Net BW9600 bps100 Mb/s10 0008 Net BW9600 bps100 Mb/s10,000 Address bits16644 Users/machine100<1100 Energy efficiency and parallelism loom on the centers projected to consume 3% of US energy by next yearNo more single-core CPUs From Architecture to OS to Application, and BackHardwareExample OS ServicesUser AbstractionProcessorProcess management, Scheduling, Traps, Processg,p ,Protections, Billing, SynchronizationMemoryManagement, Protection, Virtual memoryAddress spaceI/O devicesConcurrency with CPU, Interrupt handlingTerminal, Mouse, Printer, ( system Calls)

5 9 Calls)File systemManagement, PersistenceFilesDistributed systemsNetwork security, Distributed file systemRPC system calls, Transparent file sharingFrom Architectural to OS to Application, and BackOS ServiceHardware SupportProtectionKernel / User modeProtected InstructionsProtected InstructionsBase and Limit RegistersInterruptsInterrupt VectorsSystem callsTrap instructions and trap vectorsI/OInterrupts or Memory-MappingScheduling error Timer10 Scheduling, error recovery, billingTimerSynchronizationAtomic instructionsVirtual MemoryTranslation look-aside buffersRegister pointing to base of page tableInterrupts - Moving from Kernel to User ModeUser processes may not:address I/O directlyuse instructions that manipulate OS memory py( , page tables)set the mode bits that determine user or kernel modedisable and enable interruptshalt the machine11but in kernel mode, the OS does all these thingsa status bit in a protected processor register indicates the modeProtected instructions can only be executed in kernel interrupts ( , time slice) or system callsHistory of Operating Systems: PhasesPhase 1: Hardware is expensive, humans are cheap User at console: single-user systems Batching systems Mltiit Multi-programming systemsPhase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share serversPhase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing.

6 Lots of systems per user12 Distributed computing: lots of systems per userPhase 4: Ubiquitous computing/Cloud computing Cell phone, mp3 player, DVD player, TIVO, PDA, iPhone, eReader Software as a service, Amazon s elastic compute cloudHistory of Operating Systems: PhasesPhase 1: Hardware is expensive, humans are cheap User at console: single-user systems Batching systems Mltiit Multi-programming systemsPhase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share serversPhase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing: lots of systems per user13 Distributed computing: lots of systems per userPhase 4: Ubiquitous computingA Brief History of Operating SystemsHand programmed machines ( 45 55)Single user systemsOS = loader+ libraries of common subroutinesProblem: low utilizationof expensive components%tili tiExecution time14= % utilization Execution time +Card reader timeBatch/Off line processing ( 55 65)Batching execution of jobsCard Reader:CPU:Printer:Read Job 1 Execute Job 1 Job 2 Job 3 Job 2 Job 3 Print Job 1 Job 2 Job 315 Card Reader:CPU:Printer.

7 Read Batch 1 Execute Batch 1 Batch 2 Batch 3 Batch 2 Batch 3 Print Batch 1 Batch 2 Batch 3 Batch processing ( 55 65) Operating system = loader+ sequencer+ output processorTapeTapeOperating system system Software User ProgramUser Data16 TapeTapeInputComputeOutputCardReaderPrin terOpe at g SysteMultiprogramming ( 65 80)Keep several jobs in memory and multiplex CPU between jobsPSimple synchronous input:User Program 2 User Program 2 User Program 2 User Program 2 User Program nUser Program Pbegin:Read(var):end Psystem call Read()Simple, synchronous input:What to do while we wait for the I/O device?17 Operating SystemOperating system system Software system Software User Program 1 User Program 1beginStartIO(input device)WaitIO(interrupt)EndIO(input device):end ReadMultiprogramming ( 65 80)Keep several jobs in memory and multiplex CPU between jobsI/OUser Program 2 User Program 2 User Program 2 User Program 2 User Program nUser Program 1I/ODevicek: read()main{OSread{startIO()waitIO()18 Operating SystemOperating system system Software system Software User Program 1 User Program 1k+1:endio()interrupt}}Multiprogramming ( 65 80)Keep several jobs in memory and multiplex CPU between jobsI/OUser Program 2 User Program 2 User Program 2 User Program 2 User Program nUser Program 1 Program 2 OSI/ODevicek.

8 Read()startIO()main{read{main{}schedule( )19 Operating SystemOperating system system Software system Software User Program 1 User Program 1interruptendio{}schedule()k+1:}} History of Operating Systems: PhasesPhase 1: Hardware is expensive, humans are cheap User at console: single-user systems Batching systems Mltiit Multi-programming systemsPhase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share serversPhase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing: lots of systems per user20 Distributed computing: lots of systems per userPhase 4: Ubiquitous computingTimesharing ( 70 )A timer interrupt is used to multiplex CPU among jobsProgram 1 Program 2 OSUser Program 2 User Program 2 User Program 2 User Program 2 User Program nUser Program 1 Program 2 OStimerinterruptschedule{timerk:main{}ma in{21 Operating SystemOperating system system Software system Software User Program 1 User Program 1k+1:schedule{timerinterrupt}timerinterr uptschedule{ History of Operating Systems: PhasesPhase 1: Hardware is expensive, humans are cheap User at console: single-user systems Batching systems Mltiit Multi-programming systemsPhase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share serversPhase 3: Hardware is very cheap, humans are very expensive Personal computing.}}}

9 One system per user Distributed computing: lots of systems per user22 Distributed computing: lots of systems per userPhase 4: Ubiquitous computingOperating Systems for PCsPersonal computing systems Single user Utilization is no longer a concern Utilization is no longer a concern Emphasis is on user interface and API Many services & features not presentEvolution Initially: OS as a simple service provider (simple libraries)23(p) Now: Multi-application systems with support for coordination and communication Growing security issues ( , online commerce, medical records)Distributed Operating SystemsTypically support distributed services Sharing of data and coordination across multiple systemsPossibly employ multiple processors Loosely coupled v. tightly coupled systemsHigh availability & reliability requirements Amazon, CNNOSOSUserProgramUserProgramOSOSUserPro gramUserProgramOSfile systemOSfile system24 OSprocessmanagementOSprocessmanagementCP ULAN/WANOS process managementmemory managementOSprocess managementmemory managementCPUfyname servicesmail servicesfyname servicesmail servicesCPUN etworkHistory of Operating Systems: PhasesPhase 1: Hardware is expensive, humans are cheap User at console: single-user systems Batching systems Multi-programming systems Multiprogramming systemsPhase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share serversPhase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing.

10 Lots of systems per user25 Phase 4: Ubiquitous computing/Cloud computing Everything will have computation, from pacemakers to toasters Computing centralizing I think there is a world market for maybe five computers Tomas J. Watson, 1943 (president of IBM)What is cloud computing?Cloud computingis where dynamically scalable and often virtualized resources are provided as a service over the Internet (thanks wikipedia!)over the Internet (thanks, wikipedia!)Infrastructure as a service (IaaS) Amazon s EC2 (elastic compute cloud)Platform as a service (PaaS) Google gears Microsoft azure26 Software as a service (SaaS) gmail facebook flickr27 Thanks, James Hamilton, amazonRicher Operating SystemsIntellectual propertyCopyrighted material is being disseminated in digital form without payment to copyright them (DMCA) Napster (99-7/00) RIAA lawsuits


Related search queries