os lec01 intro

21
1 Operating System Concepts Fall 2010 Kamran Siddique

Upload: azizfarid

Post on 10-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 1/21

1

Operating System Concepts

Fall 2010

Kamran Siddique

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 2/21

2

Instructor Brief:

Kamran Siddique MS (Computer Engineering)

University of Engineering and Technology, Taxila

MCS, University of Arid Agriculture Rawalpindi

Contact Details:

Cell: 0788407733

[email protected]

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 3/21

3

Pre-requisite

Required: Introduction to computer 

Programming concepts

Recommended:

Computer organization & Assemblylanguage

 Algorithms & Data Structures

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 4/21

4

R ecommended R eading:

Operating System Concepts, by Silberchatz

 A, Peterson J and Galvin P. Addison Wesley.

³Modern Operating Systems´ by Andrew S.

Tanenbaum. Prentice Hall pubs. RichardStevens,

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 5/21

Course Objectives:

To provide you with a general understandingof how computer works.

To explain the structure and functions of anoperating system.

Studying OS design IS studying design of large software systems.

OS is needed to make hardware useful.

To interact with computer hardware moreefficiently.

To prepare you for future courses.

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 6/21

 The Course is NO T about:

 Any particular operating system.

System administration.

Installation/trouble shooting of operating

system.

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 7/21

 W hat is an Operating System (OS)?

 A program that acts as an intermediarybetween a user of a computer and the

computer hardware.

Operating system goals: Execute user programs and make solving user 

problems easier.

Make the computer system convenient to use.

Use the computer hardware in an efficientmanner.

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 8/21

Computer System Components:

1.Hardware ± provides basic computingresources (CPU, memory, I/O devices).

2.Operating system ± controls and coordinatesthe use of the hardware among the various

application programs for the various users.

3.Applications programs ± define the ways inwhich the system resources are used to solvethe computing problems of the users(compilers, database systems, video games,business programs).

4.Users (people, machines, other computers).

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 9/21

 Abstract view of system components:

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 10/21

Processor:

Two internal registers

Memory address register (MAR)

Specifies the address for the next read or write

Memory buffer register (MBR) Contains data written into memory or receives

data read from memory

I/O address register 

I/O buffer register 

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 11/21

 Top level components:

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 12/21

Processor R egisters:

User-visible registers

Which user can access and also can control their 

operation.

Control and status registers

Used by processor to control operating of the

processor 

Used by operating-system routines to control the

execution of programs

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 13/21

User visible registers:

May be referenced by machine language

 Available to all programs - application

programs and system programs

Types of registers Data

 Address

Index

Segment pointer 

Stack pointer 

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 14/21

Control & Status registers:

Program Counter (PC) Contains the address of an instruction to be

fetched

Instruction Register (IR) Contains the instruction most recently fetched

Program Status Word (PSW)

Condition codes

Interrupt enable/disable

Supervisor/user mode

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 15/21

Control & Status registers cont«

Condition Codes or Flags

Bits set by the processor hardware as a result of 

operations

Examples

Positive result

Negative result

Zero

Overflow

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 16/21

Instruction Execution:

Two steps

Processor reads instructions frommemory

Fetches

Processor executes each instruction

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 17/21

Instruction Cycle:

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 18/21

Instruction Fetch & Execute:

The processor fetches the instruction frommemory

Program counter (PC) holds address of theinstruction to be fetched next

Program counter is incremented after eachfetch

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 19/21

Instruction R egister:

Fetched instruction is placed in the instructionregister 

Categories Processor-memory

Transfer data between processor and memory

Processor-I/O  Data transferred to or from a peripheral device

Data processing  Arithmetic or logic operation on data

Control  Alter sequence of execution

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 20/21

Characteristics of a Hypothetical Machine:

8/8/2019 OS Lec01 Intro

http://slidepdf.com/reader/full/os-lec01-intro 21/21

Example of Program Execution: