1
Part I Introduction
Hardware and OS Review
Spring 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 Spring 2015 The father of supersonic flight Mu Multipro proce cesso ssor r Sys System ems
1
Spring 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
Ato tomic: These instructions execute as one uninterruptible unit. More precisely, when such an instruction is run, all other instructions being executed in various stages by the CPUs will be stopped (and perhaps re-issued later) until this instruction finishes. If two such instructions are issued at the same time, even though on different CPUs or cores, they will be executed sequentially. Pri rivi vileg eged ed: These instructions are, in general, privileged, meaning they can only execute in the supervisor or kernel mode.
7
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
8
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
9
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)
10
load addr. X syscall 10 X register syscall 10 service routine syscall
parameters a trap
11
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
12
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.
13