Week 4

25
Week 4 Operating Systems

description

Week 4. Operating Systems. Review. Program set of instructions Process / task program in execution Each process has it’s own address space Consisting of instruction region Data region Stack region Process run for an interval or quantum of time. Single-user, dedicated machine. - PowerPoint PPT Presentation

Transcript of Week 4

Page 1: Week 4

Week 4

Operating Systems

Page 2: Week 4

Review

• Program set of instructions• Process / task program in execution• Each process has it’s own address space

– Consisting of instruction region – Data region– Stack region

• Process run for an interval or quantum of time

Page 3: Week 4

OS

Single-user, dedicated machine

User program

Unused

Memory

Page 4: Week 4

Uni-programming

• Difficult application development• Assembler or machine language• No error recovery• Job scheduling (batch processing)• Processor had to do all operations • Inefficient use of resources• Non real-time

Page 5: Week 4

Operating System

• Definition “software that controls hardware”

• Resource manager - Gatekeeper• Interface between user and hardware• Separates application from hardware• File manager• Kernel is the core component of the OS

Page 6: Week 4

OS Objectives and Functions

• Convenience– Making the computer easier to use

• Efficiency– Allowing better use of computer resources

• Simplicity – Application developers can use system

procedures to reduce code

Page 7: Week 4

Multiprogramming

• Carve memory into partitions• Unique app’s loaded into each partition• Operating system switches HW resources

between partitions for a quantum of time• Appears to run simultaneously• Efficient use of processor resources• Real-time data• Con = overhead, complex

Page 8: Week 4

Partition 1 Partition 2 Partition 3

Operating System

Hardware

Time a Time b Time c

Application a Application b Application c

MEMORY

MEMORY

Page 9: Week 4

Process states

• Running• Ready• Blocked• Wait• Suspended

Page 10: Week 4

Scheduling Algorithms

• First-In-First-Out FIFO• Round-Robin RR• Shortest-Process-First SPF• Shortest-Remaining-Time SRT• Multilevel Feedback Queue• Fair Share Scheduling

Page 11: Week 4

FIFO

Page 12: Week 4

CPUABC

Completion

Job Queue

A

Preemption

RR

Page 13: Week 4

Process control block

• PID- Process identification number• PC- Program counter• Registers• State• Priority• Address space• Flags / etc

Page 14: Week 4

Layers and Views of a Computer System

Page 15: Week 4

Operating System Services

• Program creation• Program execution• Access to I/O devices• Controlled access to files• System access• Error detection and response• Accounting

Page 16: Week 4

O/S as a Resource Manager

Page 17: Week 4

Memory management

• Fixed size partitioning• Variable-size partitioning• Fragmentation• Memory leak

Page 18: Week 4

4K Page Segment

4K Page Segment

4K Page Segment

4K Page Segment

Disk

Memory

Free

Virtual memory

Page 19: Week 4
Page 20: Week 4
Page 21: Week 4

LPAR

Page 22: Week 4
Page 23: Week 4
Page 24: Week 4
Page 25: Week 4

$64 Million Question

$$$$$$$$$$$$$$$$$$$$$$$

What does this have to do with security?

$$$$$$$$$$$$$$$$$$$$$$$