+ All Categories
Home > Documents > Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright ©...

Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright ©...

Date post: 28-Mar-2015
Category:
Upload: maria-ayers
View: 243 times
Download: 4 times
Share this document with a friend
Popular Tags:
30
Chapter 1 Introduction Copyright © 2008
Transcript
Page 1: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Chapter 1

Introduction

Copyright © 2008

Page 2: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.2

Introduction

• Abstract Views of an Operating System• Goals of an OS• Operation of an OS• Preview of the Book

Page 3: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.3

Abstract Views of an Operating System

• What is an OS?– Abstract views

• To a college student: SW that permits access to the Internet• To a programmer: SW that makes it possible to develop

programs on a computer system• To a user of an application package: SW that makes it

possible to use the package• To a technician in a computerized chemical plant: invisible

component of a computer system that controls the plant

– An abstract view focuses only on essential characteristics

Page 4: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.4

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

Page 5: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.5

Abstract views

• We use abstract views to present design of OS components. It has two benefits:– Managing complexity

• Abstract view contains only selected features of a system

– Presenting a generic view• For example, user interface of Figure 1.2 has many variants

in practice– Command line interface– Graphical user interface (GUI)

Page 6: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.6

Goals of an OS

• Fundamental goals of an operating system– Efficient use of computer resources

– User convenience

– Noninterference in the activities of its users

• When these goals conflict, designer makes a trade-off for– Efficient use

– User convenience

• Notion of effective utilization– Each OS provides a different flavor of effectiveness

Page 7: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.7

Efficient Use

• OS ensures efficient use of memory, CPU, and I/O devices– Poor efficiency can result if a program does not use a

resource allocated to it

• OS itself consumes CPU and memory resources, which constitutes overhead– It reduces resources for user programs

• OS can monitor use of resources to ensure efficiency– It would increase the overhead

• OS uses policies that ensure efficiency

Page 8: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.8

User Convenience

Page 9: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.9

Noninterference

• User can face interference in computational activities– Program execution or operation of OS can be disrupted

by actions of other persons• OS prevents interference by allocating resources for

exclusive use of programs and OS services, and preventing illegal accesses to resources

– Illegal file access• OS knows which user files can be accessed by whom

– Achieved through authorization

Page 10: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.10

Operation of an OS

• Principal functions of OS:– Program management

– Resource management

– Security and protection

Page 11: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.11

Operation of an OS (continued)

Page 12: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.12

Program Management

• OS can interleave execution of programs on a fast CPU– Scheduling decides which program should be given the

CPU at any time• Policy influences efficient CPU use and user service• Preemption: Taking away the CPU from a program

Page 13: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.13

Resource Management

• Resource allocations and deallocations can be done with a resource table– Entry: name, address and status of a resource unit

– Constructed by the boot procedure, maintained during operation

Page 14: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.14

Resource Management (continued)

• Popular resource allocation strategies:– Resource partitioning

• OS decides a priori what resources to allocate to each user program; divides system resources into partitions

– A resource partition is a collection of resources• Resource table contains entries for partitions• Simple to implement, but lacks flexibility

– Pool-based• OS allocates resources from a pool of resources

– Consults table and allocates the resource if it is free

• Less overhead of allocating and deallocating resources• Achieves more efficient use of resources

Page 15: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.15

Resource Management (continued)

• A virtual resource is a fictitious resource– Abstract view of a resource taken by a program

– Supported by OS through use of a real resource

– Same real resource may support several virtual ones

– Started with the use of virtual devices• E.g., a print server

• Provides effect of having more resources• Most OSs provide virtual memory

– May execute a program bigger than size of RAM

• Some OSs create virtual machines– Each virtual machine can be allocated to a user

Page 16: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.16

Security and Protection

• Security counters threats of interference or illegal use posed by persons/programs outside OS control– Authentication: only registered user can use a computer

system

• Protection counters threats posed by users of an OS– Memory protection is a HW feature used by OS to thwart

disruption of programs and OS services

– Authorization thwarts interference with files

Page 17: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.17

Security and Protection (continued)

Page 18: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.18

Security and Protection (continued)

• Intruders are outsiders who can cause interference– May use or create malicious programs

• Trojan horses

• Viruses

• Worms

• Methods of addressing security threats– Authentication techniques

– Plugging security holes

– Internet firewalls

Page 19: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.19

Preview of the Book

• The book discusses:– Part 1: Introduction to Operating Systems

– Part 2: Managing User Computations

– Part 3: Management of Memory

– Part 4: Management of Files and I/O Devices

– Part 5: Distributed Operating Systems

• Parts 1-4 discuss conventional computing environments– Single computer system having a single CPU

Page 20: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.20

Introduction to Operating Systems

• Part 1 (Chapters 1–4)– How OS interacts with the computer and with user

programs through events and interrupts (Chapter 2)• See Figure 1.5

– Effective Utilization of a Computer System (Chapter 3)• Techniques used to ensure effective utilization

– Portability and Extensibility of Operating Systems (Chapter 4)

• Structuring of an OS achieve these goals

Page 21: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.21

Introduction to Operating Systems (continued)

Page 22: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.22

Managing User Computations

• Part 2 (Chapters 5–10) covers program management– Processes and Threads (Chapter 5)

• How programs are executed

– Process Synchronization (Chapter 6)• See Figure 1.6

– Scheduling (Chapter 7)• How to achieve effective utilization

– Deadlocks (Chapter 8)• See Figure 1.7

– Message Passing (Chapter 9)– Multiprocessor OSs (Chapter 10)

• Exploiting multiple CPUs for effectiveness

Page 23: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.23

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

Page 24: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.24

Managing User Computations (continued)

• A process has to wait if a required resource is not available• Deadlocks arise when processes wait for each other’s resources

Page 25: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.25

Management of Memory

• Part 3 (Chapters 11-12) covers memory management – Memory reuse techniques and noncontiguous memory

allocation (Chapter 11) and virtual memory (Chapter 12)

Page 26: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.26

Management of Files and I/O Devices

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

Page 27: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.27

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 files

– Implementation of File Operations (Chapter 14)• IOCS implements file operations by transferring data

between memory and I/O devices

– Security and Protection (Chapter 15)• Techniques of thwarting security and protection threats

Page 28: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.28

Distributed Operating Systems

• Part 5 (Chapters 16-21) discusses distributed OSs:– Distributed Operating Systems (Chapter 16)

• Model of a distributed computer system

• Networking HW and SW

• Distributed computation paradigms

– Theoretical Issues in Distributed Systems (Chapter 17)

• Theoretical issues that arise from networking delays and how to tackle them

– Distributed Control Algorithms (Chapter 18)

• Algorithms for performing OS functions in a distributed manner

Page 29: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.29

Distributed Operating Systems (continued)

• Part 5 (Chapters 16-21) (continued):– Recovery and Fault Tolerance (Chapter 19)

• Issues in recovery and fault tolerance in distributed systems

– Distributed 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

Page 30: Chapter 1 Introduction Copyright © 2008. Operating Systems, by Dhananjay Dhamdhere Copyright © 20081.2 Introduction Abstract Views of an Operating System.

Operating Systems, by Dhananjay Dhamdhere Copyright © 2008

1.30

Summary

• 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


Recommended