cs160 chapter 3

31
OPERATING SYSTEMS CS160

Upload: joe-paris

Post on 01-Jul-2015

626 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Cs160 chapter 3

OPERATING SYSTEMS

CS160

Page 2: Cs160 chapter 3

HISTORY OF OPERATING SYSTEMS

Operating Systems

Page 3: Cs160 chapter 3

FUNCTIONS OF AN OPERATING SYSTEM

Oversee operation of computer

Store and retrieve files

Schedule programs for execution

Coordinate the execution of programs

Page 4: Cs160 chapter 3

BATCH PROCESSING

Page 5: Cs160 chapter 3

INTERACTIVE PROCESSING

Page 6: Cs160 chapter 3

OPERATING SYSTEM ARCHITECTURE

Operating Systems

Page 7: Cs160 chapter 3

SOFTWARE CLASSIFICATION

Page 8: Cs160 chapter 3

OPERATING SYSTEM ARCHITECTURE

Application

Shell

Kernel

Hardware

Page 9: Cs160 chapter 3

WINDOWS XP SYSTEM ARCHITECTURE

Page 10: Cs160 chapter 3

WINDOWS XP SYSTEM ARCHITECTURE

Page 11: Cs160 chapter 3

OPERATING SYSTEM ARCHITECTURE

Application

Shell

Kernel

Hardware

Page 12: Cs160 chapter 3

THE BOOT PROCESS: BIOS

Custom settings are read from CMOS Complementary Metal-Oxide Semiconductor

Memory used to store configurable system settings

System setup utility

Power-on self-test (POST) is run to check system function

Page 13: Cs160 chapter 3

THE BOOT PROCESS: POST

POST

BIOS instructs CPU to read code stored at various locations and compares it to known values

BIOS loads low-level drivers and interrupt handlers for basic hardware

Checks video card

Initializes video BIOS

Tests video card and video memory

BIOS information (version, date, manufacturer) is displayed

Page 14: Cs160 chapter 3

THE BOOT PROCESS: WARM VS COLD BOOT

BIOS checks memory location 0x0472

Value of 0x1234 indicates a reboot and rest of post is skipped

Any other value indicates a cold boot and the following steps are performed

RAM is tested

Values are written then read from each memory cell

BIOS tests for existence of floppy disks, hard drive, and optical drives

Page 15: Cs160 chapter 3

THE BOOT PROCESS: HANDOFF

After POST BIOS hands off control to operating system

BIOS instructs CPU to begin executing the operating system boot loader

Code found in sector zero of primary HDD

Operating system replaces many of the device drivers and interrupt vectors that BIOS loaded

Page 16: Cs160 chapter 3

THE BOOT PROCESS: PLUG AND PLAY

ENUMERATION

The operating system adds special device drivers called enumerators

ISA bus enumerator

SCSI bus enumerator

PCI bus enumerator

PCIe bus enumerator

Port enumerator

Operating system asks each enumerator to identify which devices it has and what resources they require

Page 17: Cs160 chapter 3

THE BOOT PROCESS: RESOURCE ARBITRATION

Operating system assigns resources to each enumerated device

IRQ

DMA

Memory addresses

If no new devices are discovered, stored PnP information is used

Operating system loads appropriate high-level device drivers for each PnP device

Drivers initialize each device

Page 18: Cs160 chapter 3

THE BOOT PROCESS: FINISHING UP

Operating system mounts disk drives for use

Video drivers are installed to allow for use of video hardware

Operating system services are initialized

User logon screen displayed

Page 19: Cs160 chapter 3

COORDINATING THE MACHINE’SACTIVITIES

Operating Systems

Page 20: Cs160 chapter 3

PROCESSES

Program: a set of instructions given to a computer

Process: a program in execution

Process state: the current status of a process including the contents of the relevant CPU registers

Page 21: Cs160 chapter 3

PROCESS STATE DIAGRAM

New

Ready

Admitted

Running

Scheduler dispatch

TerminatedExit

Interrupt

Waiting

I/O or event waitI/O or event completion

Page 22: Cs160 chapter 3

PROCESS ADMINISTRATION

Processes compete for operating system attention and computer resources

Operating system coordinates execution of processes

Scheduler

Dispatcher

Page 23: Cs160 chapter 3

SCHEDULER

Scheduler manages a pool of processes which are currently being executed

Adds new processes

Removes completed processes

This pool is a collection of process control blocks (PCBs)

Page 24: Cs160 chapter 3

DISPATCHER

Responsible to ensuring processes get scheduled for CPU time

The act of changing from one process to another is called a context switch

PCBs are packed/unpacked

Cooperative multitasking

Processes remove themselves from running state

Preemptive multitasking

Dispatcher evicts process when time slice expires

Occurs on interrupt

Page 25: Cs160 chapter 3

CONTEXT SWITCHING

Page 26: Cs160 chapter 3

HANDLING COMPETITION AMONG

PROCESSES

Operating Systems

Page 27: Cs160 chapter 3

SEMAPHORES

Page 28: Cs160 chapter 3

DEADLOCK

Page 29: Cs160 chapter 3

SECURITY

Operating Systems

Page 30: Cs160 chapter 3

USER ACCOUNTS

Privileges assigned according to account type

Super User or Administrator

Standard user

Other role-based accounts

Page 31: Cs160 chapter 3

HIERARCHICAL PROTECTION DOMAINS

(PROTECTION RINGS)

Least Privileged

Most Privileged

Application

Shell

Ring 3

Ring 2

Kernel

Ring 1

Hardware

Ring 0