Lecture Operating systems: A concept-based approach (2/e): Chapter 2 - Dhananjay M. Dhamdhere

73 27 0
Lecture Operating systems: A concept-based approach (2/e): Chapter 2 - Dhananjay M. Dhamdhere

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chapter 2 - Overview of operating systems. Chapter 2 describes the different classes of operating systems, discusses the fundamental concepts and techniques used by each of them, and lists those of their techniques that are employed in modern operating systems as well.

PROPRIETARY MATERIAL. ©  2007 The McGraw­Hill Companies, Inc. All rights reserved. No part of this PowerPoint slide  may be displayed, reproduced or distributed  in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw­Hill  for their individual course preparation. If you are a student using this PowerPoint slide, you are using it without permission.  Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 1 Copyright © 2008 Overview of operating systems • A modern OS contains a very large number of features – Many of these features were first introduced in different classes of operating systems, namely * Batch Processing operating systems * Multiprogramming operating systems * Time sharing operating systems * Real time operating systems * Distributed operating systems – These features are used in a modern OS as well * We study these features in the context of the relevant OS * Study their influence on system performance and user service Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 2 Copyrightâ2008 Recap from Chapter The fundamental goals of an operating system – Obtain * High system performance * Good user service within a computing environment – A computing environment consists of a computer system, its interfaces with other systems, and user computations * Measures of system performance and user service depend on the computing environment Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— AConceptưBasedApproach,2ed SlideNo:3 Copyrightâ2008 Recap from Chapter Fundamental tasks of an OS – Management of Programs * Organize their execution by sharing the CPU * Ensure good user service – Management of Resources * Fast allocation and de-allocation without constraining user programs * Efficient use of resources – Security and Protection * Ensure absence of interference with programs and resources by entities within and outside the OS Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 4 Copyright © 2008 Introduction In this chapter, we shall first study: • Fundamentals of OS operation – Features of a computer that are important for an OS – How the OS controls execution of programs – How a program interacts with an OS • Efficiency, system performance and user convenience – Measures of system performance – User service as a measure of user convenience Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 5 Copyrightâ2008 OS and the Computer System In this module, we study – Fundamental features of computer systems that are important to an OS * Memory hierarchy * Interrupt structure * I/O organization – How an OS uses these features to control operation of an OS – Fundamentals of how a program interacts with an OS Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed SlideNo:6 Copyrightâ2008 Memory utilization during operation of an OS ThekernelisthecoreoftheOS;itismemoryresidentatalltimes •  Non­kernel programs are loaded in the transient area when needed •  Rest of the memory is shared between user programs Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 7 Copyright © 2008 Model of a computer system •  The CPU and the I/O subsystem have independent paths to memory •  The memory management unit plays a part in implementing virtual memory Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 8 Copyrightâ2008 The program status word (PSW) The CPU contains two kinds of registers – User accessible registers * Used for arithmetic or logical operations, addressing, indexing, etc These are called general purpose registers, or simply, CPU registers – Control registers * Condition code register (also called the flags register), program counter, etc * Their contents govern operation of the CPU • Control registers are collectively called the program status word (PSW) – Individual control registers are considered as fields of the PSW Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 9 Copyright © 2008 Fields of the Program Status Word (PSW) •  The ‘privileged mode’ field indicates whether the CPU is in the privileged     mode, which is used by the OS, or user mode         *  Some instructions can be executed only when CPU is in the privileged mode •  Condition code and Program counter registers were mentioned before •  Other registers are discussed later Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 10 Copyright © 2008 Time sharing systems • Relation between time slice and response time – Choice of the time slice depends on two factors * Response time to programs * Overhead of switching between programs (σ) – If every program consumes δ CPU seconds before producing a response, * response time is = na x (δ + σ), where na is the number of active programs * CPU efficiency is = δ / (δ+σ) Chapter 2: Overview of  Operating Systems Dhamdhere:OperatingSystems AConceptưBasedApproach,2ed SlideNo:59 Copyrightâ2008 Choice of Influence of δ on response time – If δ is very small * A program may need more CPU time than δ to satisfy a request  Hence a program may have to be scheduled several times before a response can be obtained * Efficiency is low if δ and σ are comparable * Cache performance may be poor – If δ is large * Response time would be better than na x ( δ+σ ) * Efficiency would be better than δ / (δ+σ) because programs may not use the complete time slice Chapter2:Overviewof OperatingSystems Dhamdhere:OperatingSystems AConceptưBasedApproach,2ed SlideNo:60 Copyrightâ2008 Swapping Swapping is the technique of moving inactive programs out of the memory temporarily – It increases the number of programs that can be processed by the time sharing system Q: What are the conditions under which swapping is most effective? Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 61 Copyright © 2008 A schematic of swapping •  The OS swaps out a program that is not likely to be executed immediately    in future; it frees the memory occupied by the program •  It swaps in a new program in the newly freed memory •  The swapped­out program is loaded back before its turn for execution   Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 62 Copyright © 2008 Real time Operating system • A real time OS is used to service time critical applications – A time critical application is one that malfunctions if it does not receive a ‘timely response’ * Timeliness of the response depends on the nature of the application * A real time OS focuses on providing a timely response to an application Chapter 2: Overview of  OperatingSystems Dhamdhere:OperatingSystems AConceptưBasedApproach,2ed SlideNo:63 Copyrightâ2008 Real time Operating system Two kinds of real time operating systems – Hard real time system: Meets the response requirement of an application under all conditions (including error recovery actions, if any) * Used in command and control applications * A computer system may have to be dedicated to an application – Soft real time system: Meets the response requirement of an application in a probabilistic manner * Used in applications such as multimedia and reservation systems Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 64 Copyright © 2008 Real time operating systems • Features of a real time OS – Permits creation of multiple processes within an application * Overlapped operation of processes speeds up the application – Permits priorities to be assigned to processes – Permits a programmer to define interrupts in an application’s domain and provide interrupt processing routines * Enables the application to respond readily to events – Uses priority driven or deadline oriented scheduling * Helps in meeting the application’s time constraints – Provides fault tolerance and graceful degradation * Such that essential services can be performed in a timely manner Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed SlideNo:65 Copyrightâ2008 A satellite data logging application A satellite sends data to an earth station periodically – A computer application in the earth station receives the data * The computer stores the data in the signal in a file * Storing of data should be completed before the next signal arrives Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 66 Copyright © 2008 Tasks in the satellite data logging application •  Process 1 copies the data •  Process 2 writes the data into a file •  Process 3 performs statistical analysis on the data  Chapter 2: Overview of  Operating Systems Dhamdhere:OperatingSystems AConceptưBasedApproach,2ed SlideNo:67 Copyrightâ2008 Distributed operating system Definition: a distributed computer system – A distributed computer system consists of a number of computer systems, each having its own memory and performing some of the control functions of the OS, interacting through the network – Each computer system is called a host or node, and the place where it is located is called a site Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 68 Copyrightâ2008 A distributed system AWANconnectsgeographicallydistantnodes ALANconnectsnodeswithinanoffice,laboratoryorbuilding Chapter2:Overviewof OperatingSystems Dhamdhere:OperatingSystems AConceptưBasedApproach,2ed SlideNo:69 Copyrightâ2008 Distributed systems Benefits of a distributed system – Resource sharing * An application can use resources located in other computers – Reliability * Provides availability of resources despite faults – Computation speed-up * Parts of a computation can be executed simultaneously in different computers – Communication * Users in different computer systems can communicate – Incremental growth * Cost of enhancing capabilities of a system is proportional to the desired enhancement Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 70 Copyright © 2008 Features of Distributed Operating Systems • Parts of a distributed operating system execute in different nodes of a distributed system Its salient features are: – The OS provides support for distributed computations * Remote procedure call (RPC) * Distributed file systems – The OS uses distributed control techniques because * Several computers participate in a decision * Control data may be distributed across nodes in the system Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— AConceptưBasedApproach,2ed SlideNo:71 Copyrightâ2008 Classical OS concepts in Modern OSs A modern OS supports different kinds of users, hence it has to fulfill diverse requirements – It uses many (most?) of the classical concepts discussed so far to meet different requirements * We will see details of these in the next slide – It uses adaptive techniques so that it can select the techniques that best suit a specific program * This way it can handle diverse workloads effectively Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 72 Copyright © 2008 Classical OS concepts in Modern OSs • A modern OS uses the following classical concepts – Batch processing concepts * Database queries and back-office processing are batched – Priority-based preemptive scheduling * To provide better service to high priority applications * To obtain efficient use of resources – Time slicing * To provide good response times – Swapping * To increase the number of processes serviced – Creating multiple processes in an application * To provide timely response to real time applications – Resource sharing across boundaries of computers Chapter 2: Overview of  Operating Systems Dhamdhere: Operating Systems— A Concept­Based Approach , 2 ed Slide No: 73 Copyright © 2008 ... environment Chapter 2:  Overview of  Operating Systems Dhamdhere: OperatingSystems AConceptưBasedApproach,2ed SlideNo:3 Copyright 20 08 Recap from Chapter Fundamental tasks of an OS – Management of Programs...        is suspended until the new interrupt gets handled Chapter2 :Overviewof OperatingSystems Dhamdhere: OperatingSystems AConceptưBasedApproach,2ed SlideNo :29 Copyright 20 08 System Call A computer has a special instruction called a ‘software... Chapter 2:  Overview of  OperatingSystems Dhamdhere: OperatingSystems AConceptưBasedApproach,2ed SlideNo:13 Copyright 20 08 Memory hierarchy The memory hierarchy is a cost-effective method of obtaining a large and fast

Ngày đăng: 30/01/2020, 00:27

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan