Академический Документы
Профессиональный Документы
Культура Документы
These slides were compiled from the OSC textbook slides (Silberschatz, Galvin,
and Gagne) and the instructors class materials.
Definitions
Resource allocator manages and allocates resources
Control program controls the execution of user progr
ams and operations of I/O devices
Kernel the one program running at all times (all else b
eing application programs)
Operating-System Operations
Protection
Distinguishing user and kernel
I/O Management
Asynchronous I/Os
Process Management
Launching, synchronizing, and terminating programs
Memory Management
Giving each task a independent logical address space
Storage Management
Giving logical views of disk spaces, (i.e. directories and files)
CSS503
CHAPTER 1: INTRODUCTION
A bit of History
Batch systems
Multiprogramming
Time-sharing systems (multi-user)
PC Systems (protection!)
Symmetric Multiprocessor Architecture
Batch Systems
A job is assembled of the program, the d
ata, and some control information (in co
ntrol cards).
Programmers pass their jobs to an opera
tor.
The operator batched together jobs.
OS transfers control from one job to ano
ther.
Each job output is sent back to the progr
ammer.
Multiprogramming
Time-Sharing Systems
This is a logical extension of m
ultiprogramming.
Each user has at least one sep
arate program in memory.
A program in execution is refer
red to as a process.
Process switch occur so freque
ntly that the users can interact
with each program while it is r
unning.
File system allows users to acc
ess data and program interacti
vely.
Personal-Computer Systems
Personal computers computer system dedicated to a sing
le user.
User convenience and responsiveness
Can adopt technology developed for larger operating system
s some features.
At its beginning, a single user system didnt not need advanc
ed CPU utilization and protection.
Later, file protection is necessary to avoid virus and bad stuff
Quad-Core Design
CPU core0
CPU core1
CPU core2
CPU core3
registers
registers
registers
registers
cache
cache
cache
cache
Memory
CSS430 Operating Systems : Introduction
11
Computer-System Operation
I/O devices and the CPU can execute concurrently.
Each device controller is in charge of a particular devi
ce type.
Each device controller has a local buffer.
CPU moves data from/to main memory to/from local bu
ffers.
I/O is from the device to local buffer of controller.
Device controller informs CPU that it has finished its op
eration by causing an interrupt.
Dual-Mode Operations
1. User mode execution done on behalf of a user.
2. Kernel mode (also supervisor mode, system mode, or Kernel mode)
execution done on behalf of OS
Switching between two modes:
User to Kernel: Device interrupts, hardware traps -- system calls caus
e a trap to the kernel mode
Kernel to User: special instruction (IRET) causes the OS to return to u
ser mode after servicing requests.
15
Interrupt Handling
The operating system preserves the state of the CPU
by storing registers and the program counter.
Determines which type of interrupt has occurred:
polling
vectored interrupt system
Separate segments of code determine what action s
hould be taken for each type of interrupt.
Synchronous I/O
user
Requesting process
waiting
Device Driver
kernel
Interrupt Handler
Hardware
data transfer
time
user
Requesting process
continuing
Device Driver
kernel
Interrupt Handler
Hardware
data transfer
time
I/O Management
user
requesting process
waiting
device driver
kernel
Interrupt handler
Hardware
data transfer
time
CSS503
CHAPTER 1: INTRODUCTION
user
a requesting process
replaced with another one
interrupts
device driver
kernel
DMA
Interrupt handler
Hardware
data transfer
time
CSS503
CHAPTER 1: INTRODUCTION
Process Management
A program in execution
Process needs:
CPU, memory, Files, I/Os etc.
OS must supports:
Creation: loading it in memory
Synchronization/communication: h
aving a process wait for another.
Termination: clean it up from mem
ory
CHAPTER 1: INTRODUCTION
Memory Management
Process As Logical Address
Text
Heap
Heap
Process C
Text
Stack
Heap
Stack
Stack
CSS503
CHAPTER 1: INTRODUCTION
Storage Management
Disk partitioning
Allowing multiple file systems
File operations
open, read, write, seek, close
CSS503
CHAPTER 1: INTRODUCTION
Storage-Device Hierarchy
Memory Hierarchy
Level
Size
Speed
(ns)
Managed
by
Inclusion property
Memory coherence
Registers
1KB
0.25 ~ 0.5
Compiler
Cache
16MB
0.5 ~ 25
Hardware
Main
memory
16GB
80 ~ 250
OS
Hard disks
Several TB
5000
OS
CSS503
CHAPTER 1: INTRODUCTION
Discussions
Solve Text Exercises:
1.8 (Privileged Instructions)
1.10 (CPU Mode)
1.22 (DMA)
1.25 (Cache Memory)
CSS503
CHAPTER 1: INTRODUCTION