cs160 chapter 3

Post on 01-Jul-2015

626 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

OPERATING SYSTEMS

CS160

HISTORY OF OPERATING SYSTEMS

Operating Systems

FUNCTIONS OF AN OPERATING SYSTEM

Oversee operation of computer

Store and retrieve files

Schedule programs for execution

Coordinate the execution of programs

BATCH PROCESSING

INTERACTIVE PROCESSING

OPERATING SYSTEM ARCHITECTURE

Operating Systems

SOFTWARE CLASSIFICATION

OPERATING SYSTEM ARCHITECTURE

Application

Shell

Kernel

Hardware

WINDOWS XP SYSTEM ARCHITECTURE

WINDOWS XP SYSTEM ARCHITECTURE

OPERATING SYSTEM ARCHITECTURE

Application

Shell

Kernel

Hardware

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

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

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

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

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

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

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

COORDINATING THE MACHINE’SACTIVITIES

Operating Systems

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

PROCESS STATE DIAGRAM

New

Ready

Admitted

Running

Scheduler dispatch

TerminatedExit

Interrupt

Waiting

I/O or event waitI/O or event completion

PROCESS ADMINISTRATION

Processes compete for operating system attention and computer resources

Operating system coordinates execution of processes

Scheduler

Dispatcher

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)

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

CONTEXT SWITCHING

HANDLING COMPETITION AMONG

PROCESSES

Operating Systems

SEMAPHORES

DEADLOCK

SECURITY

Operating Systems

USER ACCOUNTS

Privileges assigned according to account type

Super User or Administrator

Standard user

Other role-based accounts

HIERARCHICAL PROTECTION DOMAINS

(PROTECTION RINGS)

Least Privileged

Most Privileged

Application

Shell

Ring 3

Ring 2

Kernel

Ring 1

Hardware

Ring 0

top related