week 1 course introduction introduction to operating systems operating system structures operating...

Download WEEK 1 COURSE INTRODUCTION INTRODUCTION TO OPERATING SYSTEMS OPERATING SYSTEM STRUCTURES Operating Systems CS3013 / CS502

Post on 29-Dec-2015

214 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • WEEK 1

    COURSE INTRODUCTIONINTRODUCTION TO OPERATING SYSTEMSOPERATING SYSTEM STRUCTURESOperating SystemsCS3013 / CS502

  • AgendaCourse Introduction

    Introduction to Operating System

    Operating System Concepts

    Operating System Structures

    *

  • Course InformationWebsitehttp://nile.wpi.edu/~clee01/teaching/cs3013/6:00-9:50pm class on Mondays7 weeks for CS3013, 10 weeks for CS502Office HoursTBDTextbookSilberschatz, Galvin, and Gagne, Operating Systems Concepts, Seventh Edition, John Wiley and Sons, 2005.*

  • Why an Operating Systems Course?*WPI CS requirementCore area for both undergrads and grads

    Understanding of inner workings of systems

    Combines CS conceptsAlgorithms, languages, data structures, hardwareSystem design with tradeoffs

    Better use of the computer

  • Prerequisites*C/C++ Programming

    Data Structures

    Computer Organization

    Unix/Linux user experience and access

  • Homework, Projects and Exams*HomeworkDesigned to get you ready for examReview ideas taught in classProjects2 for CS3013 and 3 for CS502Implementation in Unix environmentExams2 for CS3013 and 3 for CS502Closed book, Closed notes

  • Grading*GradingHomework 10%Projects 30%Exams 60%

    WPI Academic Honesty Policyhttp://www.wpi.edu/Pubs/Policies/Honesty/policy.html

    Late Policy 25% per dayContact Professor for extenuating circumstances

  • *Questions?

  • Professor BackgroundChoong-Soo LeePhD Candidate in Computer Science DepartmentInterest in Systems AreaOperating SystemsNetwork PerformanceMultimedia Performance

    *

  • Student BackgroundBasic InformationNameClass (freshman, sophomore, )Major (CS, EE, )C ExperienceCS Courses TakenLinux ExperienceOperating System(s)*

  • Agenda*

  • Objectives*Identify operating systems

    Explain the major OS issues

    Describe the history of OS

    Explain OS concepts

    Identify services provided by OS

    Describe different types of OS structures

  • Class Discussion*What operating systems do you know?

    What is an operating system?

    What do you like/dislike about OS(es) you know?

  • Components of a Computer System*Program InterfaceUser ProgramsOS InterfaceOperating SystemHumansHardware Interface/Privileged InstructionsCPU/Memory/Disk/etc

  • Functions of Operating System*Beautification PrincipleHide the details of the physical machine and provide a more pleasant virtual machine

    Resource PrincipleAllocate resources to processes

  • Major OS Issues*

  • OS History*Single program executionNo OSAssembly or lower level languageBatch (Spooling)Introduced notion of interruptsMultiprogrammingIllusion of executing several programs simultaneouslyIntroduced notion of processDistributed and Network Operating SystemsSpecialized Operating Systems

  • OS History - Unix and Linux*UnixDescendant of MULTICSFirst C version in 1973Posix (1981) defines standard Unix system callsLinuxOpen Source1991, v.01 by Linus Torvalds for 80386 processorProper Unix process support

  • OS History Linux*1994, v1.0Enhanced file systemMore devices, dynamic kernel modules1995, v1.2More hardware support1996, v2.0Multiple architectures, multiple processorsThreads, memory managementToday, v2.60.64% by Net Applications5.2 million source lines of code (according to wikipedia)

  • OS History - Windows*1988, v1Win32 API1990, v3.1Server and Workstation versions1996, v4 (Windows 95)Win95 InterfaceGraphics to Kernel

  • OS History - Windows*2000, v5 (Windows 2000)Micro-kernelMulti-user (with terminal services)4 versions2005, Windows XP4 versions: Home, Professional, Media Center, Tablet2007, Windows Vista5 versions: Ultimate, Home Premium, Home Basic, Business, Enterprise2009?, Windows 7

  • OS History - Windows*Today91.65% by Net ApplicationsAiming at robust, server marketIntel x86 onlyLines of code (according to wikipedia)Windows NT 4.0 : 11-12 millionWindows 2000 : more than 29 millionWindows XP : 40 millionWindows Vista Beta 2 : 50 million

  • Objectives*Identify operating systems

    Explain the major OS issues

    Describe the history of OS

    Explain OS concepts

    Identify services provided by OS

    Describe different types of OS structures

  • Agenda*

  • Operating System Concepts*Processes

    Memory Management

    Input/Output

    Files

    System Calls

  • Process*Program vs. ProcessProgram : a set of data and code that manipulate itProcess : a program in execution

    States of a ProcessRunning, Waiting, Ready, etc.

    Process Tree

  • Memory Management*One chunk of physical memory

    Shared by all processes

    32 bit architecture232 bytes 4GB

    Process 1Process 2Process 3Process 4???

  • Input/Output*OS manages resources including other devicesSignificant fraction of codeWant to be simple to use

  • Files*Store data on diskDirectory TreeWorking DirectoryProtection bitsAbstraction of I/O devicePiperootcs1101cs1101classesjobsmicrosoftcisco

  • System Calls*Way processes communicate with OS

    OS specific

    POSIX (1980s)Portable Operating System Interface

  • Shells*Users interface to OS

    Simple commandscd, cat, top

    Modifiers&, |, >

  • Agenda*

  • Services Provided by OS*User InterfaceProgram ExecutionI/O OperationsFile-system ManipulationCommunicationsError DetectionResource AllocationAccountingProtection and Security

  • User Interface*Command InterpreterIncluded in the kernel, or

    External ProgramShellsbash, csh, tcsh, etc.

    Provides some basic functionality

  • User Interface*Graphical User Interface1970s, Xerox PARC Research Facility

    1980s, Popular by Apple Macintosh

    Windows 1.0

    Unix Desktop Environments

  • User Interface*Graphical User Interface

  • Simple Systems*Started small and grew, no hardware supportExampleMS-DOS, Embedded SystemsMS-DOS DriversROM - BIOS Device DriversResident System ProgrammingApplication Programming

  • Simple Systems*ExampleLinux

    With Modules

  • Abstract layersCan only talk to lower layersLayer NUser interface

    ...

    Layer 1

    Layered Systems*Layer 0 Hardware

  • Microkernel*Minimal Functions in MicrokernelProvide communication facility between applications and servicesExampleMachTru64 Unix, QNX

    KernelUser ProcessFile ServerMemory Server

  • Virtual Machine*Abstract the hardware of a single computer into several different execution environmentsExample:IBM VM/370 VMWare

    HardwareVirtual MachineOperating SystemOperating SystemOperating SystemProcessProcessProcess

  • Virtual Machine*ExampleJava Virtual MachineHardwareOperating SystemJava VMProcessProcessJava OSJava Program

  • Objectives*Identify operating systems

    Explain the major OS issues

    Describe the history of OS

    Explain OS concepts

    Identify services provided by OS

    Describe different types of OS structures

    **************AbstractionStandardized way of ordering the computer hardware to do somethingSwitchesVolume, Resolution (users)Output sound, display, read from disk

    Resource

    Secretary Resource is your boss or client

    What OS isntHardware

    Programming Language

    Command Interpreter

    Applications

    * Applications use facilities provided by the operating system*Structure : Organization of OS

    Sharing: sharing of resources

    Naming: resource naming

    Performance: Fast

    Conconcurrency: parallel activities created/controlled/synchronized

    Windows FAT16 = 2GB, FAT32 = 32GB*Punch cards

    Punch cards to tape

    Specialized Operating System

    Server Operating Systems

    Real-time OS, performance constraints

    Embedded OS (PDA), Palm OS, Windows CE

    Smart card OS**Odd = developmental versionEven = Stable version************Do some demonstration

    **I/O : disk, printout, display

    Communications : network

    ****Application not really separate from OS

    No protection

    Big Mess**Execution of programI/O -> Memory -> Scheduler

    Overhead gets pretty big.

    - translation of data between layers

    Design of these layers becomes an issue - there might be cases where its unclear where to put the layer

    *Client-server model

    Good performance

    Robust

    Adaptable to distributed OS*Complete protection

    OS development and emulation*Platform independent**