os1-p1c1-computerorganization
os1-p1c1-computerorganization
E-mail: [email protected]
(partly based on slides of Le Thanh Van)
1 / 47
Outline
2 / 47
Outline
3 / 47
Basic concepts
Operating system
= Operating + system
4 / 47
Basic concepts
Operating system
= Operating + system
Systems can be
human resources
a computer hardware organization
5 / 47
Basic concepts
Operating system
= Operating + system
Systems can be
human resources
a computer hardware organization
An operating
system?
6 / 47
OS - A manager
Abstract view
7 / 47
OS - A manager
Abstract view
Users
Operating system
Resources
8 / 47
OS - A manager
Abstract view
Users
in Computer
Operating system System
Resources
9 / 47
OS - A manager
Abstract view
Users
in Computer
Design issues
Operating system System
10 / 47
OS - A manager
Abstract view
Users
in Computer
Design issues
Operating system System
11 / 47
Definition
Operating system
being a basis for application programs
acting as an intermediary between the computer user and
the computer hardware
12 / 47
Definition
Operating system
being a basis for application programs
acting as an intermediary between the computer user and
the computer hardware
13 / 47
Definition
Operating system
being a basis for application programs
acting as an intermediary between the computer user and
the computer hardware
16 / 47
Modern computer system
17 / 47
Modern computer system
18 / 47
Modern computer system
19 / 47
Event detection
20 / 47
Event detection
21 / 47
Event detection
Polling
“Polling is like picking up your phone every few seconds to see
if you have a call. ...”
22 / 47
Interrupt mechanism (1)
Interrupt
An event is signaled by an interrupt from
Hardware: sending a signal to CPU, thru system bus
Software: executing a special operation, called system call
23 / 47
Interrupt mechanism (1)
Interrupt
An event is signaled by an interrupt from
Hardware: sending a signal to CPU, thru system bus
Software: executing a special operation, called system call
25 / 47
Interrupt mechanism (2)
Types of interrupts
Program: arithmetic overflow, division by zero, invalid memory access
Timer: CPU performs a task periodically
I/O: finish of an I/O operation, failures in I/O operation
Hardward failure: power failure, memory parity
Trap (software interrupt): a system call
26 / 47
I/O methods by interrupt
28 / 47
Direct memory access structure
29 / 47
Direct memory access structure
30 / 47
Direct memory access structure
(Source: UCLA)
31 / 47
Storage hierarchy
32 / 47
Storage hierarchy
33 / 47
Storage hierarchy
34 / 47
Caching
Cache
A high-speed memory to hold recently-accessed data
35 / 47
Caching - Performance of various storage levels
36 / 47
How a modern computer system works
37 / 47
Hardware protection
38 / 47
Hardware protection
39 / 47
Dual-mode protection
Execution of OS code and user-defined code must be
distinguished
40 / 47
Dual-mode protection
Execution of OS code and user-defined code must be
distinguished
There are at least 2 separate modes of operation:
User mode - execution done on behalf of a user
Kernel mode (also monitor, system, supervisor, privileged
mode) - execution done on behalf of operating system
41 / 47
Dual-mode protection
Execution of OS code and user-defined code must be
distinguished
There are at least 2 separate modes of operation:
User mode - execution done on behalf of a user
Kernel mode (also monitor, system, supervisor, privileged
mode) - execution done on behalf of operating system
Mode bit added to computer hardware to indicate the
current mode.
43 / 47
Memory protection (1)
44 / 47
Memory protection (2)
46 / 47
Kernel data structures
47 / 47