1
Part I Introduction
Hardware and OS Review
Fall 2015
The scientist described what is: the engineer creates what never was. Theodor von Karman The father of supersonic flight
Part I Introduction Hardware and OS Review The scientist described - - PowerPoint PPT Presentation
Part I Introduction Hardware and OS Review The scientist described what is: the engineer creates what never was. Theodor von Karman 1 Fall 2015 The father of supersonic flight Mu Multipro proce cesso ssor r Sys System ems
1
Fall 2015
The scientist described what is: the engineer creates what never was. Theodor von Karman The father of supersonic flight
2
tightly coupled systems, have more than one CPUs.
dvan anta tage ges:
Increased throughput: gets more jobs done Economy of scale: Because of resource sharing, multiprocessor systems are cheaper than multiple single processor systems. Increased reliability: the failure of one processor will not halt the whole system.
3
control of the same OS.
master-slave) relationship exists.
registers CPU 0 cache registers CPU 1 cache memory registers CPU 2 cache
4
among cores are faster than among CPUs.
registers CPU core 0 cache registers CPU core 1 cache memory
5
user mode and the supervisor (or system, kernel, privileged) mode, controlled by a mode bit.
he OS OS r run uns s in th n the e su supe perv rviso sor r mod
e an and d al all us user er pr prog
rams s ru run n in n th the e us user er mod
(e.g., I/O and CPU mode change) are privileged
cases, can only be used in the supervisor model.
user program), execution mode is changed to the supervisor (resp., user) mode.
6
is an int nter erru rupt
completion of an I/O, a keypress, a request for service, a division by zero and so on.
software.
division by 0) is usually referred to as a trap.
meaning the OS is in action only if an interrupt
7
activated by an interrupt.
program is suspended.
transferred to the OS.
resumed when the service completes. interrupt ADD #4, 3 interrupt handler service
kernel
mode switch
kernel mode user mode
8
made available by an operating system.
trap), and the caller is suspended.
Process control (e.g., create and destroy processes) File management (e.g., open and close files) Device management (e.g., read and write operations) Information maintenance (e.g., get time or date) Communication (e.g., send and receive messages)
9
load addr. X syscall 10 X register syscall 10 service routine syscall
parameters a trap
10
an interrupt, actually a trap.
(i.e., caller) is suspended.
the OS.
resumed when the system call service completes.
syscall 10 interrupt handler
syscall services
kernel
mode switch
kernel mode user mode
11
control over the CPU, it has to prevent a user program from getting the CPU forever without calling for system service (i.e., I/O).
se an an int nter erva val t timer er! An interval timer is a count-down timer.
interval timer to certain value. Once the interval timer counts down to 0, an interrupt is generated and the OS can take appropriate action.
12
tomic c Ins nstr truc ucti tion
uninterruptible unit without interleaving and cannot be split by other instructions. When an atomic instruction is recognized by the CPU, all other instructions being executed in various stages by the CPUs are suspended (and perhaps re-issued later) until this instruction finishes. No interrupts can occur
time, even on different CPUs or cores, they will be executed sequentially.
13
Test-and-Set) for synchronization later.
could occur when instructions modify a shared memory location. Race conditions will be discussed in the next unit.
rivi vileg eged ed Ins nstr truc ucti tion
instructions, in general, can only execute in the supervisor or kernel mode.
14