Académique Documents
Professionnel Documents
Culture Documents
. 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 1: Introduction
An operating system (OS) is a collection of programs that achieve effective utilization of a computer system by providing
Convenient methods of using a computer
* Saves users time and boosts their productivity
Chapter 1: Introduction
Abstract views
Abstract views
The abstract view of a specific function helps in understanding the system data and fundamental operations on them
Chapter 1: Introduction
User interface: Accepts commands from users: GUI, command line interface Non-kernel programs: Implement user commands Kernel: Core of the OScontrols the computer, provides functions & services
Chapter 1: Introduction Dhamdhere: Operating Systems A Concept-Based Approach, 2 ed
Slide No: # Copyright 2008
Chapter 1: Introduction
Goals of an OS
User convenience
* A user should find it easy to use the computer
Chapter 1: Introduction
User convenience
Computing environments change with the architecture and use of a computer, e.g. personal computing, online applications, embedded applications Hence the notion of user convenience has several facets that depend on the computing environment
Chapter 1: Introduction
User convenience
Good service
* Speedy response
Ease of Use
* User friendliness
Web-oriented features
* e.g., Web-enabled servers
Evolution
* Addition of new features, use of new computers
Chapter 1: Introduction Dhamdhere: Operating Systems A Concept-Based Approach, 2 ed
Slide No: # Copyright 2008
Operation of an OS
* Provide means through which many programs can work toward a common goal
Helps in more convenient or faster fulfillment of user requirements
Resource management
* Ensure efficient use of resources Use of CPU, I/O devices
Chapter 1: Introduction
Operation of an OS
Resource allocation
* Sharing of resources among user programs
Chapter 1: Introduction
Operation of an OS
OS performs several tasks repeatedly to implement scheduling, resource management, and security and protection
Chapter 1: Introduction
Chapter 1: Introduction
Program management
A computational structure is a configuration of several programs. Three typical computational structures are:
A single program
* Execution of a program on a given set of data
Co-executing programs
* The OS must execute these programs at the same time * The OS must provide an interface between co-executing programs so that their results are available to one another
Chapter 1: Introduction Dhamdhere: Operating Systems A Concept-Based Approach, 2 ed
Slide No: # Copyright 2008
A schematic of scheduling
Programs waiting for CPU attention are entered in a pool The scheduler picks one program from the pool for execution on the CPU The CPU may be forcibly taken away from a program. This action is called pre-emption A pre-empted program is again entered into the pool
Chapter 1: Introduction
Resource management
Virtual resources
Chapter 1: Introduction
Terminology
* An intruder is a person or program that causes interference
* Security measures avoid interference by non-users and their programs * Protection measures avoid interference by users and their programs
Chapter 1: Introduction
* When a user/program tries to access a resource, the OS verifies whether the user has the permission to perform the access
Chapter 1: Introduction
Authentication checks whether a person is a registered user Threats posed by non-users are security threats Threats posed by a user are protection threats
Chapter 1: Introduction Dhamdhere: Operating Systems A Concept-Based Approach, 2 ed
Slide No: # Copyright 2008
Chapter 1: Introduction
How does an OS keep track of activities in its various units and in user programs?
An activity causes an event at an appropriate time
* An event is a situation that requires the OSs attention
The OS keeps track of events in the computer system and in user programs. This way it knows the activities in its units and in programs. For example,
* A log in operation is an event
* An I/O operation is an event * Completion of a program is an event
Chapter 1: Introduction
The computer should be executing user programs most of the time When an event occurs, the OS should obtain control to handle the event Q: How is this achieved? A: Occurrence of an event raises an interrupt, which switches the CPU to OS
Chapter 1: Introduction Dhamdhere: Operating Systems A Concept-Based Approach, 2 ed
Slide No: # Copyright 2008
Execution of programs
Chapter 1: Introduction
Managing memory
Chapter 1: Introduction
Virtual Memory
Users may wish to write very large programs. Some of these programs may not fit in memory
The OS uses virtual memory to overcome this problem
* Only some portion(s) of the code and data of a process are present in memory at any time
* Other portions are loaded in memory when needed * Portions not presently needed may be removed from memory
Chapter 1: Introduction
The OS maintains information about portions of a process that are in memory A missing from memory event occurs if a required portion is not in memory The OS now loads it in memory
Chapter 1: Introduction Dhamdhere: Operating Systems A Concept-Based Approach, 2 ed
Slide No: # Copyright 2008
File processing
Chapter 1: Introduction
Message passing
Facilitates communication among processes
Deadlock handling
Avoids indefinite waits
Chapter 1: Introduction
Process synchronization
Coordination of activities
* Processes must perform their operations in a desired order
e.g., if a process wishes to use some data produced by another process, it must read the data only after the other process has assigned a value to it
Chapter 1: Introduction
(a) The Credit and Debit processes share the account balance, hence only one of them should access it at any time (b) Generate produces a sample and Analyze analyzes it. Analyze must wait if Generate has not yet produced a sample
Chapter 1: Introduction
Deadlocks
Some resources cannot be shared across processes; they must be used by only one process at a time
If a resource is in use by a process, another process wishing to use the resource must wait for the process to release it
* Indefinite waits would arise if processes wait for each other This situation is called a deadlock It degrades response time and efficiency of use
Chapter 1: Introduction
Pk needs a resource that is currently allocated to Pi Pi needs a resource that is currently allocated to Pj Pj needs a resource that is currently allocated to Pk
Each of the processes waits indefinitely
Chapter 1: Introduction
A distributed OS manages computers in a distributed system in a well-integrated manner to provide two key benefits
* high reliability
Redundancy of resources in various computers is exploited to ensure that a process can complete despite failures
* speed-up of a computation by performing some of its parts in different computer systems
Chapter 1: Introduction
Issues in Distributed OS
Individual computers in a distributed system have their own clocks and memories
Clocks in different computers are not synchronized, hence they may show different times It is difficult to obtain a consistent view of data and activities
* E.g., balances in two accounts, recorded while transferring funds between them, may not be mutually consistent (see next slide)
Chapter 1: Introduction
An observer in node Z records balances in accounts A and B while funds are being transferred Z may record balance of X before $100 are transferred from it to Y, and balance of Y after the transfer$100 are generated! Z may record balance of X after $100 are transferred from it to Y, and balance of Y before the transfer$100 are lost!
Chapter 1: Introduction Dhamdhere: Operating Systems A Concept-Based Approach, 2 ed
Slide No: # Copyright 2008
Issues in Distributed OS
Theoretical issues
How to know the order in which events have occurred?
* Important for FCFS allocation, etc.
Issues in Distributed OS
Recovery
User computations should not suffer due to node or link failures
* OS restores computations in a failed node to a previous state
Chapter 1: Introduction
Issues in Distributed OS
Enable users to know whether documents or data have been tampered with
Chapter 1: Introduction