lecture01 introduction

22
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008 TUCN. Operating Systems. Lecture 1

Upload: ricardoomarromeroramos

Post on 10-Nov-2015

214 views

Category:

Documents


0 download

DESCRIPTION

fund de la administracion

TRANSCRIPT

  • IntroductionOperating Systems Concepts and StructureLecture 1~ Spring, 2008 ~Spring, 2008TUCN. Operating Systems. Lecture 1

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1ContentsDefinition of an Operating System (OS)Role of an Operating SystemHistory of Operating SystemsClassification of Operating SystemsSpecific terms and conceptsStructure of an OSSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1The Definition of an OSWhere comes the OS in?A computer system consists of:User softwareSystem softwareHardwareSpring, 2008

    User ApplicationsCompilersEditorsShellsOperating SystemSystem hardware

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1The Definition of an OSWhat is an OS?A system softwareA collection of procedures that: manage all the systems hardware resourcesprovide the users the environment in which they can:use the system resources run their own applications

    Spring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1The Role of an OSExtended or virtual machineThe external or the user point of view A top-down perspectiveHides the complexity of using the hardware devicesProvides the user a more convenient view of the system resourcesPurpose: ConvenienceResource managerThe inside or the designer point of viewA bottom-up perspectiveBrings the hardware resources in a functional stateProvides each program with time and space for using resourcesPurpose: EfficiencySpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    A Classification of OSsMainframe operating systems: OS/390Server operating systems: UNIX, Windows 2000, LinuxMultiprocessor operating systemsPC operating systems: Windows 98, Windows ME, Macintosh, LinuxReal-time operating systems: VxWorks, QNXEmbedded operating systems: PalmOS, Windows CE, Windows Mobile, SymbiaSpring, 2008TUCN. Operating Systems. Lecture 1

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1Specific Terms and ConceptsBatch systems: no user interaction Multiprogramming: multiple programs loaded in memory Time-sharing: each process receives slices of CPU time Interactive systems: provides quick response to users actionsMulti-user: distinction between usersNetwork OS: users aware of the existence of multiple computersDistributed OS: looks like a traditional single-processor systemProcesses, Files, System CallsSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1Computer Hardware (1)An OS is closely tied to the HW it runs onHW componentsCPUMemoryI/O devicesMonitorKeyboardStorage devices (HDD, Floppy etc.)OthersBUSesSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1Computer Hardware (2)Tanenbaum, Fig. 1-5.MonitorBUSSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1CPUFunctionalityfetch instructions from memory, decode and execute themInstruction sethas a specific set of instructions that can be executedspecific executable programs each processor can runRegistersProgram counterStack pointerMany others architecture dependent Machine state saved at context switchKernel vs. User mode of executionswitches between system callshardware exceptions, interruptionsSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1MemoryShould be extremely fast, large and cheapHierarchy of layersRegisters: fastest, no delay, but limited sizeCache memorycache hits and misses Main memory RAM (Random Access Memory)HDDs2 orders of magnitude cheaper and larger then RAM, but 3 orders of magnitude slowermechanical device heads, tracks (cylinders), sectors, Magnetic tapesused as a backup for very large data setsvery slow, but very cheap and removableSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1I/O DevicesComponentscontroller and the device itselfControllerDirectly controls the physical deviceReceives commands from the OSDevice driverSupplied by controller manufacturerInserted into the OS run in kernel modeFunctionalityBusy waitingInterruptsSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1ProcessesDefinitionA program in executionConsists of: executable code, data, stack, CPU registers value, and other informationA process hierarchy (tree)A created two child processes: B and CB created three child processes: D, E, and FProcess synchronizationInter-Process Communication (IPC)Spring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1FilesDefinitionA collection of related informationAn abstraction of data stored on HDDA process treeFile system mountingFile linkingSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1System calls (1) Definitiona call to an OS servicea trap into the OS codeExamples of system callsFile manipulation: open(), read(), write(), lseek(), close() File system management: mkdir(), mount(), link(), chown() Process management: fork(), exec(), wait(), exit() Spring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1System Calls (2)Steps in making a system callThere are 11 steps executingthe system call: read (fd, buffer, nbytes)Spring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1The Structure of an OSArchitectures(1). Monolithic OS Spring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1The Structure of an OSArchitectures (2). Layered OS The Structure of the THE operating system

    Spring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1The Structure of an OSArchitectures (3). Client-Server The client-server modelA distributed OSSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1The Structure of an OSArchitectures (4).Advantages Advantages of micro-kernelsthe modules run in user mode protection against bugsadaptability to use in distributed systemsforces the programmers to adopt a modularize approach easily ported to other architecturesbetter use of RAM than monolithic ones Modules in monolithic systems (Linux) - advantages monolithic OS faster than micro-kernel OSmodularized approach platform independence frugal main memory usage no performance penalty Spring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1Process manager: creates, schedules and destroy processesMemory manager: allocates and releases memoryDisk managerI/O devices managerFile system: create, read, modify, remove etc. filesCommunication systemProtection systemShellstext interface command interpretergraphical interfaceThe Structure of an OSComponentsSpring, 2008

    TUCN. Operating Systems. Lecture 1

    No. *

    TUCN. Operating Systems. Lecture 1ReadingsAndrew Tannenbaum, Modern Operating Systems, second edition, Prentice Hall, 2001, pgs. 1-20, 34-63D. Bovet, M. Cesati, Understanding Linux Kernel, OReilly, 2001, pgs.11-12Spring, 2008

    TUCN. Operating Systems. Lecture 1

    **********************