Download - II. Computer System Structure
II. Computer System Structure
1. Interrupt Based System1) Physical IOCS vs. Logical IOCS Relation
PROBLEM PROG
LOGICAL
IOCS
PHYSICAL IOCS
INPUT
DEVICE
Issue GET
Next instruction
Provide record and return toprob. prog
ORIF I/O required WAIT
When I/o completereturn to problemprogram
(channel scheduler)
Determine channelif channel busythen return to logical IOCS
If channel not busyissue START I/Oand return to Logical IOCS
When I/O complete
I/O START
I/O complete
II. Computer System Structure
2) A kind of Interrupt- External Interrupt
: Timer, Key on Console , Signal from other process
- SVC Interrupt: Super Visor Call Interrupt
- I/O Interrupt : I/O completion or Error occurrence
- Machine Check : Error of machine in System
- Program Check : Execution Error of Program
( Divide by 0 , Error instruction)
II. Computer System Structure
3) The Processing of Interrupt
Program begin
Interrupt begin
Interrupt execute
Interrupt complete
Program
Interrupt process routine
II. Computer System Structure
System Operation User mode
Monitor mode - Supervisor mode
- System mode
Dual-mode operation ( Context Switching ) ex) Program execution (1) (3) Program execution
User mode
System mode(2) Interrupt execution
II. Computer System Structure
4) Relation of New, Current and Old_PSW in INTERRUPT - I
SUPVR PRG 74
PRGIOIADD A, B
ADD C, K
Location of next instruction
Current PSW
New PSW Old PSW
PRGIOI
009138
PRGEXT
PRGSVC
PRGPCK
PRGMCK
PRGIOI 009138
58
60
68
70
78
18
20
28
30
38
21
4
3
II. Computer System Structure
4) Relation of New, Current and Old_PSW in INTERRUPT - II
6
SUPVR PRG 74
PRGIOIADD A, B
ADD C, K
Location of next instruction
Current PSW
New PSW Old PSW
009138
PRGEXT
PRGSVC
PRGPCK
PRGMCK
PRGIOI 009138
58
60
68
70
78
18
20
28
30
38
78
5
II. Computer System Structure
2. I/O Interrupt1) Processing I/O Requests Relationship
- Without I/O interruption
SYSTEMin wait state
1 2 3 4 5 6
F1
F2
F3
SUPVR
I/O
processingI/O wait
Waiting for I/O completion
processingI/O wait
Waiting for I/O completion
processing
I/O wait
task selection task selection task selection
ALL BOUND
Active stateInactive state
II. Computer System Structure
- Case of I/O interruptI/O interrupt sequence
F1 : s I/O interrupt occurs
F2 : s I/O interrupt occurs
F3 : s I/O interrupt occurs
Waiting for I/O
Waiting for I/O Waiting to be selected
F1
F2
F3
Waiting for I/O
SUPVRPosting Traffic Bit & Performing Task Selection
Waiting to be selected
Systemin wait state
F1 F2 F3
I/O interrupts
II. Computer-System Structure
3. Storage Structure
Main-memory : volatile storage device ( Register, cache )
Magnetic Disk : sectors track cylinder package
Magnetic Tape : backup, infrequently, transfering
track
sector
cylinder
platter
rotation arm
actuatorRead-write head
II. Computer-System Structure
1) Storage Hierarchy- Caching : by cache size, replacement policy 80~99%
- internal programmable registerex) index register, Accumulator
- cache coherency & consistency (a copy of A ) in a multiprocessor
in a distributed environment
Register
cache
main memory
electronic disk
magnetic disk
optical disk
magnetic tapes
Storage Hierarchy
II. Computer-System Structure
2) H/W Protection : for system utilization- To share system resources
SPOOL
multiprogramming
- Dual mode operation
user mode
monitor mode supervisor mode
system mode
privileged mode
privileged instruction : executed in busy monitor mode
ex) I/0 instruction , Timer ...
II. Computer-System Structure- Memory protection
Base registerLimit register
A base and a limit register
define a logical address space.
Monitorjob 1
job 2
job 3
job 4
0
256000
300040
420940
8800001024000
300040
120900base register
limit register
base + limit
trap to operating system
monitor - addressing error
CPU address yes yes
no no
memory
base Hardware address protection
with base and limit registers.
II. Computer-System Structure
- CPU protection : Infinite loop - Timer : Control OS X
- System Call (monitor call) : Process OSInterface
Use of a system call to perform I/O.
Case n
read
system call n
perform I/O
residentmonitor
user program
returnto user
trap to monitor
II. Computer-System Structure
3 ) Multiprocessor Systems- Throughput : n processor n speed up ratio
- Reliability
- fail-soft : 1 gain in 10 processor graceful degradation
Symmetric multiprocessing : Same O.S copy
ex) Tandem system
Asymmetric multiprocessing : a master processor with slave processors
Speed up
n