1 introduction

35
1 CSE451 Introduction to Operating Systems Spring 2007 Module 1 Course Introduction Gary Kimura & Mark Zbikowski March 26, 2007

Upload: mekko

Post on 03-Oct-2015

1 views

Category:

Documents


0 download

DESCRIPTION

едедедев ед е е

TRANSCRIPT

  • CSE451 Introduction to Operating Systems Spring 2007Module 1Course Introduction

    Gary Kimura & Mark ZbikowskiMarch 26, 2007

  • TodayClass detailsCSE451 educational objectivesA quick look at what is an operating system & some history

    The class web page (http://www.cs.washington.edu/451) is up and runningClass informationLecture notesProject and homework assignmentsHelpful hints and other pointersEmail discussion

  • Class detailsInstructors: Gary Kimura (garyki at cs dot washington dot edu)Mark Zbikowski (mzbik at cs dot washington dot edu)TAs: Ben Lerner (blerner at cs dot washington dot edu)Gabriel Maganis (gym at cs dot washington dot edu)Our backgroundPlease ask questions during class and make the lectures interactiveClass size

  • Grading (subject to adjustment)15% HomeworkApproximately 8 assignmentsOne week from when the assignment is handed out to when it it due50% ExamsOne midterm (20%) (tentatively May 2)Final (30%)30% Projects Tentatively 4 projectsAt least two weeks to finish each project5% Other

  • Tentative class outlineSilberschatz, et.al., Operating System Concepts (7th Edition)OS Overview (Chapters 1 and 2)Process Management (Chapters 3, 4, 5, 6 and 7)Memory Management (Chapter 8 and 9)Storage Management and I/O (Chapters 10, 11, 12 and 13)Security (Chapters 14 and 15)Linking and Loading

  • Your job for week #1Readings in SilberschatzChapter 1 (Monday lecture), Chapter 2 (Wednesday lecture)Homework #1Out: Today Monday March 26, 2007Due: Next Monday April 4, 2007 in classSee handout and the class web pageProject #0 will be discussed ThursdayBrush up on C and binary/octal/hexadecimal

  • CSE 451 Education objectivesTwo views of an OSThe OS users (i.e., application programmers) viewThe OS implementers viewIn this class we will learn:What are the major parts of an O.S.How is the O.S. and each sub-part structuredWhat are the important common interfacesWhat are the important policiesWhat algorithms are typically usedWe will do this through reading, lectures, and a project.You will need to keep up with all three of these.

  • What is an Operating System?The average computer user has trouble understanding this questionNote card exerciseOn the blank side of the note card write in one sentence your own definition of an operating systemOn the lined side of the card write three things you would like this class to cover

  • What is an Operating System?An operating system (OS) is:a software layer to abstract away and manage details of hardware resourcesa set of utilities to simplify application development

    all the code you didnt write in order to implement your application

    ApplicationsOSHardware

  • What is Windows?DOSApplication John DeTreville, Microsoft Corp.

  • What is Windows?DOSWindowsInstallerCOMPrintingTCP/IPBrowserFile systemApplication John DeTreville, Microsoft Corp.

  • What is .NET?InternetApplication John DeTreville, Microsoft Corp.

  • What is .NET?magicInternet.NETDeviceindependenceXMLIdentity& securityAsynchronyExtensibilityApplication John DeTreville, Microsoft Corp.

  • Whats in an OS?Machine Dependent ServicesInterrupts, Cache, Physical Memory, TLB, Hardware DevicesGeneric I/OFile SystemMemory ManagementProcess ManagementVirtual MemoryNetworkingNamingAccess ControlWindowing & graphicsWindowing & GfxMachine Independent ServicesApplication ServicesSYSTEM CALL APIMD APIDevice DriversShellsSystem UtilsQuakeSql ServerLogical OS Structure

  • The OS and HardwareAn OS mediates programs access to hardware resourcesComputation (CPU)Volatile storage (memory) and persistent storage (disk, etc.)Network communications (TCP/IP stacks, ethernet cards, etc.)Input/output devices (keyboard, display, sound card, etc.)The OS abstracts hardware into logical resources and well-defined interfaces to those resourcesprocesses (CPU, memory)files (disk)sockets (network)

  • Why bother with an OS?Application benefitsprogramming simplicitysee high-level abstractions (files) instead of low-level hardware details (device registers)abstractions are reusable across many programsportability (across machine configurations or architectures)device independence: 3Com card or Intel card?User benefitssafetyprogram sees own virtual machine, thinks it owns computerOS protects programs from each otherOS fairly multiplexes resources across programsefficiency (cost and speed)share one computer across many usersconcurrent execution of multiple programs

  • The major OS issuesstructure: how is the OS organized?sharing: how are resources shared across users?naming: how are resources named (by users or programs)?security: how is the integrity of the OS and its resources ensured?protection: how is one user/program protected from another?performance: how do we make it all go fast?reliability: what happens if something goes wrong (either with hardware or with a program)?extensibility: can we add new features?communication: how do programs exchange information, including across a network?

  • Major issues in OS (2)Concurrency: how are parallel activities created and controlled?Scale and growth: what happens as demands or resources increase?Persistence: how to make data last longer than programsCompatibility & Legacy Apps: can we ever do anything new?Distribution: Accessing the world of informationAccounting: who pays the bills, and how do we control resource usage?

    These are engineering trade-offsBased on objectives and constraints

  • Progression of concepts and form factors Silberschatz, Galvin and Gagne

  • Has it all been discovered?New challenges constantly ariseembedded computing (e.g., iPod)sensor networks (very low power, memory, etc.)peer-to-peer systemsad hoc networkingscalable server farm design and management (e.g., Google)software for utilizing huge clusters (e.g., MapReduce, Bigtable)overlay networks (e.g., PlanetLab)worm fingerprintingfinding bugs in system code (e.g., model checking)Old problems constantly re-define themselvesthe evolution of PCs recapitulated the evolution of minicomputers, which had recapitulated the evolution of mainframesbut the ubiquity of PCs re-defined the issues in protection and security

  • Protection and security as an examplenoneOS from my programyour program from my programmy program from my programaccess by intruding individualsaccess by intruding programsdenial of servicedistributed denial of servicespoofingspamwormsvirusesstuff you download and run knowingly (bugs, trojan horses)stuff you download and run obliviously (cookies, spyware)

  • OS historyIn the very beginningOS was just a library of code that you linked into your program; programs were loaded in their entirety into memory, and executedinterfaces were literally switches and blinking lightsAnd then came batch systemsOS was stored in a portion of primary memoryOS loaded the next job into memory from the card readerjob gets executedoutput is printed, including a dump of memoryrepeatcard readers and line printers were very slowso CPU was idle much of the time (wastes $$)

  • SpoolingDisks were much faster than card readers and printersSpool (Simultaneous Peripheral Operations On-Line)while one job is executing, spool next job from card reader onto diskslow card reader I/O is overlapped with CPUcan even spool multiple programs onto disk/drumOS must choose which to run nextjob schedulingbut, CPU still idle when a program interacts with a peripheral during executionbuffering, double-buffering

  • MultiprogrammingTo increase system utilization, multiprogramming OSs were inventedkeeps multiple runnable jobs loaded in memory at onceoverlaps I/O of a job with computing of anotherwhile one job waits for I/O completion, OS runs instructions from another jobto benefit, need asynchronous I/O devicesneed some way to know when devices are doneinterruptspollinggoal: optimize system throughputperhaps at the cost of response time

  • TimesharingTo support interactive use, create a timesharing OS:multiple terminals into one machineeach user has illusion of entire machine to him/herselfoptimize response time, perhaps at the cost of throughputTimeslicingdivide CPU equally among the usersif job is truly interactive (e.g., editor), then can jump between programs and users faster than users can generate loadpermits users to interactively view, edit, debug running programs (why does this matter?)

  • MIT CTSS system (operational 1961) was among the first timesharing systemsonly one user memory-resident at a time (32KB memory!)MIT Multics system (operational 1968) was the first large timeshared systemnearly all OS concepts can be traced back to Multics!second system syndrome

  • CTSS as an illustration of architectural and OS functionality requirements

    OSUser program

  • Parallel systemsSome applications can be written as multiple parallel threads or processescan speed up the execution by running multiple threads/processes simultaneously on multiple CPUs [Burroughs D825, 1962]need OS and language primitives for dividing program into multiple parallel activitiesneed OS primitives for fast communication among activitiesdegree of speedup dictated by communication/computation ratiomany flavors of parallel computers todaySMPs (symmetric multi-processors, multi-core)MPPs (massively parallel processors)NOWs (networks of workstations)computational grid (SETI @home)

  • Personal computingPrimary goal was to enable new kinds of applicationsBit mapped display [Xerox Alto,1973]new classes of applicationsnew input device (the mouse)Move computing near the displaywhy?Window systemsthe display as a managed resourceLocal area networks [Ethernet]why?Effect on OS?

  • Distributed OSDistributed systems to facilitate use of geographically distributed resourcesworkstations on a LANservers across the InternetSupports communications between programsinterprocess communicationmessage passing, shared memorynetworking stacksSharing of distributed resources (hardware, software)load balancing, authentication and access control, Speedup isnt the issueaccess to diversity of resources is goal

  • Client/server computingMail server/serviceFile server/servicePrint server/serviceCompute server/serviceGame server/serviceMusic server/serviceWeb server/serviceetc.

  • Peer-to-peer (p2p) systemsNapsterGnutellaexample technical challenge: self-organizing overlay networktechnical advantage of Gnutella?er legal advantage of Gnutella?

  • Embedded/mobile/pervasive computingPervasive computingcheap processors embedded everywherehow many are on your body now? in your car?cell phones, PDAs, network computers, Typically very constrained hardware resourcesslow processorsvery small amount of memory (e.g., 8 MB)no disktypically only one dedicated applicationlimited powerBut this is changing rapidly!

  • CSE 451Philosophyyou may not ever build an OSbut as a computer scientist or computer engineer you need to understand the foundationsmost importantly, operating systems exemplify the sorts of engineering design tradeoffs that youll need to make throughout your careers compromises among and within cost, performance, functionality, complexity, schedule A good OS should be easily usable by everyone

  • Next timeWhat features in the Hardware does an OS need?

    September 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating SystemsSeptember 30, 2002

    CSE 451 Introduction to Operating Systems