Khoa học máy tính - Chapter 1: Introduction

OS services programs simultaneously by allocating some of the resources to each program and interleaving their execution on the CPU Requirements to ensure effectiveness of computing: Efficient use User convenience Non-interference Primary functions Management of programs Management of resources Security and protection

ppt30 trang | Chia sẻ: nguyenlam99 | Lượt xem: 836 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Khoa học máy tính - Chapter 1: Introduction, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Chapter 1IntroductionCopyright © 20081An Introduction to Programming with C++, Fifth EditionIntroductionAbstract Views of an Operating SystemGoals of an OSOperation of an OSPreview of the Book2An Introduction to Programming with C++, Fifth EditionAbstract 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 characteristics3An Introduction to Programming with C++, Fifth EditionAbstract 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 4An Introduction to Programming with C++, Fifth EditionAbstract 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)5An Introduction to Programming with C++, Fifth EditionGoals 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 effectiveness6An Introduction to Programming with C++, Fifth EditionEfficient 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 efficiency7An Introduction to Programming with C++, Fifth EditionUser Convenience8An Introduction to Programming with C++, Fifth EditionNoninterferenceUser 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 authorization9An Introduction to Programming with C++, Fifth EditionOperation of an OSPrincipal functions of OS:Program managementResource managementSecurity and protection10An Introduction to Programming with C++, Fifth EditionOperation of an OS (continued)11An Introduction to Programming with C++, Fifth EditionProgram 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 program12An Introduction to Programming with C++, Fifth EditionResource 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 operation13An Introduction to Programming with C++, Fifth EditionResource 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 resources14An Introduction to Programming with C++, Fifth EditionResource 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 user15An Introduction to Programming with C++, Fifth EditionSecurity 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 files16An Introduction to Programming with C++, Fifth EditionSecurity and Protection (continued)17An Introduction to Programming with C++, Fifth EditionSecurity and Protection (continued)Intruders are outsiders who can cause interferenceMay use or create malicious programs Trojan horsesVirusesWormsMethods of addressing security threatsAuthentication techniquesPlugging security holesInternet firewalls18An Introduction to Programming with C++, Fifth EditionPreview 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 CPU19An Introduction to Programming with C++, Fifth EditionIntroduction to Operating SystemsPart 1 (Chapters 1–4)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 goals20An Introduction to Programming with C++, Fifth EditionIntroduction to Operating Systems (continued)21An Introduction to Programming with C++, Fifth EditionManaging User ComputationsPart 2 (Chapters 5–10) 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 effectiveness22An Introduction to Programming with C++, Fifth EditionManaging User Computations (continued) Processes Credit and Debit must access the balance in an account without interference Process Generate produces some data; Analyze uses it23An Introduction to Programming with C++, Fifth EditionManaging User Computations (continued) A process has to wait if a required resource is not available Deadlocks arise when processes wait for each other’s resources24An Introduction to Programming with C++, Fifth EditionManagement of MemoryPart 3 (Chapters 11-12) covers memory management Memory reuse techniques and noncontiguous memory allocation (Chapter 11) and virtual memory (Chapter 12)25An Introduction to Programming with C++, Fifth EditionManagement of Files and I/O Devices Part 4 (Chapters 13-15) discusses management of files and I/O devices26An Introduction to Programming with C++, Fifth EditionManagement 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 threats27An Introduction to Programming with C++, Fifth EditionDistributed 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 manner28An Introduction to Programming with C++, Fifth EditionDistributed 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 systems29An Introduction to Programming with C++, Fifth EditionSummaryOS 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 protection30An Introduction to Programming with C++, Fifth Edition

Các file đính kèm theo tài liệu này:

  • pptchapter_01_9431.ppt
Tài liệu liên quan