chapter 01

30
Chapter 1 Introduction Copyright © 2008

Upload: ticker

Post on 20-Nov-2015

215 views

Category:

Documents


1 download

DESCRIPTION

Operating Systems Chapter 1 PPT VTU

TRANSCRIPT

  • Chapter 1IntroductionCopyright 2008

    An Introduction to Programming with C++, Fifth Edition

  • IntroductionAbstract Views of an Operating SystemGoals of an OSOperation of an OSPreview of the Book

    An Introduction to Programming with C++, Fifth Edition

  • Abstract Views of an Operating SystemWhat is an OS?Abstract viewsTo a college student: SW that permits access to the InternetTo a programmer: SW that makes it possible to develop programs on a computer systemTo a user of an application package: SW that makes it possible to use the packageTo a technician in a computerized chemical plant: invisible component of a computer system that controls the plantAn abstract view focuses only on essential characteristics

    An Introduction to Programming with C++, Fifth Edition

  • Abstract Views of an Operating System (continued)Operating system designer also has an abstract view

    OS is a collection of routines that facilitates execution

    of user programs and use of resources

    An Introduction to Programming with C++, Fifth Edition

  • Abstract viewsWe use abstract views to present design of OS components. It has two benefits:Managing complexityAbstract view contains only selected features of a systemPresenting a generic viewFor example, user interface of Figure 1.2 has many variants in practiceCommand line interfaceGraphical user interface (GUI)

    An Introduction to Programming with C++, Fifth Edition

  • Goals of an OSFundamental goals of an operating systemEfficient use of computer resourcesUser convenienceNoninterference in the activities of its usersWhen these goals conflict, designer makes a trade-off forEfficient useUser convenienceNotion of effective utilizationEach OS provides a different flavor of effectiveness

    An Introduction to Programming with C++, Fifth Edition

  • Efficient UseOS ensures efficient use of memory, CPU, and I/O devicesPoor efficiency can result if a program does not use a resource allocated to itOS itself consumes CPU and memory resources, which constitutes overheadIt reduces resources for user programsOS can monitor use of resources to ensure efficiencyIt would increase the overheadOS uses policies that ensure efficiency

    An Introduction to Programming with C++, Fifth Edition

  • User Convenience

    An Introduction to Programming with C++, Fifth Edition

  • NoninterferenceUser can face interference in computational activitiesProgram execution or operation of OS can be disrupted by actions of other personsOS prevents interference by allocating resources for exclusive use of programs and OS services, and preventing illegal accesses to resourcesIllegal file accessOS knows which user files can be accessed by whomAchieved through authorization

    An Introduction to Programming with C++, Fifth Edition

  • Operation of an OSPrincipal functions of OS:Program managementResource managementSecurity and protection

    An Introduction to Programming with C++, Fifth Edition

  • Operation of an OS (continued)

    An Introduction to Programming with C++, Fifth Edition

  • Program ManagementOS can interleave execution of programs on a fast CPUScheduling decides which program should be given the CPU at any timePolicy influences efficient CPU use and user servicePreemption: Taking away the CPU from a program

    An Introduction to Programming with C++, Fifth Edition

  • Resource ManagementResource allocations and deallocations can be done with a resource tableEntry: name, address and status of a resource unitConstructed by the boot procedure, maintained during operation

    An Introduction to Programming with C++, Fifth Edition

  • Resource Management (continued)Popular resource allocation strategies:Resource partitioningOS decides a priori what resources to allocate to each user program; divides system resources into partitionsA resource partition is a collection of resourcesResource table contains entries for partitionsSimple to implement, but lacks flexibilityPool-basedOS allocates resources from a pool of resourcesConsults table and allocates the resource if it is freeLess overhead of allocating and deallocating resourcesAchieves more efficient use of resources

    An Introduction to Programming with C++, Fifth Edition

  • Resource Management (continued)A virtual resource is a fictitious resourceAbstract view of a resource taken by a programSupported by OS through use of a real resourceSame real resource may support several virtual onesStarted with the use of virtual devicesE.g., a print serverProvides effect of having more resourcesMost OSs provide virtual memoryMay execute a program bigger than size of RAMSome OSs create virtual machinesEach virtual machine can be allocated to a user

    An Introduction to Programming with C++, Fifth Edition

  • Security and ProtectionSecurity counters threats of interference or illegal use posed by persons/programs outside OS controlAuthentication: only registered user can use a computer systemProtection counters threats posed by users of an OSMemory protection is a HW feature used by OS to thwart disruption of programs and OS servicesAuthorization thwarts interference with files

    An Introduction to Programming with C++, Fifth Edition

  • Security and Protection (continued)

    An Introduction to Programming with C++, Fifth Edition

  • Security and Protection (continued)Intruders are outsiders who can cause interferenceMay use or create malicious programs Trojan horsesVirusesWormsMethods of addressing security threatsAuthentication techniquesPlugging security holesInternet firewalls

    An Introduction to Programming with C++, Fifth Edition

  • Preview of the BookThe book discusses:Part 1: Introduction to Operating SystemsPart 2: Managing User ComputationsPart 3: Management of MemoryPart 4: Management of Files and I/O DevicesPart 5: Distributed Operating SystemsParts 1-4 discuss conventional computing environmentsSingle computer system having a single CPU

    An Introduction to Programming with C++, Fifth Edition

  • Introduction to Operating SystemsPart 1 (Chapters 14)How OS interacts with the computer and with user programs through events and interrupts (Chapter 2)See Figure 1.5Effective Utilization of a Computer System (Chapter 3)Techniques used to ensure effective utilizationPortability and Extensibility of Operating Systems (Chapter 4)Structuring of an OS achieve these goals

    An Introduction to Programming with C++, Fifth Edition

  • Introduction to Operating Systems (continued)

    An Introduction to Programming with C++, Fifth Edition

  • Managing User ComputationsPart 2 (Chapters 510) covers program managementProcesses and Threads (Chapter 5)How programs are executedProcess Synchronization (Chapter 6)See Figure 1.6Scheduling (Chapter 7)How to achieve effective utilizationDeadlocks (Chapter 8)See Figure 1.7Message Passing (Chapter 9)Multiprocessor OSs (Chapter 10)Exploiting multiple CPUs for effectiveness

    An Introduction to Programming with C++, Fifth Edition

  • Managing User Computations (continued) Processes Credit and Debit must access the balance

    in an account without interference Process Generate produces some data; Analyze uses it

    An Introduction to Programming with C++, Fifth Edition

  • Managing User Computations (continued) A process has to wait if a required resource is not

    available Deadlocks arise when processes wait for each others

    resources

    An Introduction to Programming with C++, Fifth Edition

  • Management of MemoryPart 3 (Chapters 11-12) covers memory management Memory reuse techniques and noncontiguous memory allocation (Chapter 11) and virtual memory (Chapter 12)

    An Introduction to Programming with C++, Fifth Edition

  • Management of Files and I/O Devices Part 4 (Chapters 13-15) discusses management of files

    and I/O devices

    An Introduction to Programming with C++, Fifth Edition

  • Management of Files and I/O Devices (continued)Part 4 (Chapters 13-15) (Contd.)File Systems (Chapter 13)Allows users to create, use, and share filesImplementation of File Operations (Chapter 14)IOCS implements file operations by transferring data between memory and I/O devicesSecurity and Protection (Chapter 15)Techniques of thwarting security and protection threats

    An Introduction to Programming with C++, Fifth Edition

  • Distributed Operating SystemsPart 5 (Chapters 16-21) discusses distributed OSs:Distributed Operating Systems (Chapter 16)Model of a distributed computer systemNetworking HW and SWDistributed computation paradigmsTheoretical Issues in Distributed Systems (Chapter 17)Theoretical issues that arise from networking delays and how to tackle themDistributed Control Algorithms (Chapter 18) Algorithms for performing OS functions in a distributed manner

    An Introduction to Programming with C++, Fifth Edition

  • Distributed Operating Systems (continued)Part 5 (Chapters 16-21) (continued):Recovery and Fault Tolerance (Chapter 19)Issues in recovery and fault tolerance in distributed systemsDistributed File Systems (Chapter 20)Reliability and performance improvement techniques used in distributed file systems Distributed System Security (Chapter 21) Techniques used to address security issues in distributed systems

    An Introduction to Programming with C++, Fifth Edition

  • SummaryOS services programs simultaneously by allocating some of the resources to each program and interleaving their execution on the CPURequirements to ensure effectiveness of computing:Efficient useUser convenienceNon-interferencePrimary functionsManagement of programsManagement of resourcesSecurity and protection

    An Introduction to Programming with C++, Fifth Edition