Early computer systems Operating System one job at a time · Early computer systems No OS ... one...
Transcript of Early computer systems Operating System one job at a time · Early computer systems No OS ... one...
Operating
System
Brief history
Early computer systems
No OS
programmers aware of the underlying HW
no multitasking
one job at a time
IBM System 360
OS 360 (IBM) [1965]
multitasking
pagination
assembly
Brief history
Multics (MIT/General Electrics/Bell Labs) [1965]
PDP-7
memory mapped files
(sort of) virtual filesystem
process memory segments viewed as files
dynamic linking
multitasking
pagination
segmentation
interprocess calls
dropped
Brief history
Unix [1969]
PDP-7 (PDP-11 initially)
then widespread
C
preemptive multitasking
pagination
segmentation
Brief history
MS-DOS [1981]
no advanced features (lack of hw support)
Windows 3.1 [1992]
pagination
multitasking (no preemption)
Windows NT 3.1 [1993]
Linux [start: 1991 ver. 1.0 release: 1994]
Several others
� VAX/VMS, MAC-OS, OS/2, QNX, Symbian OS, ...
Features
Abstraction
HW details
Management
resources
Protection
Errors / attacks
Features
Program execution management
Security
User mode vs Supervisor/Protected/Kernel mode
Multitasking
Hardware management
Abstraction
Hardware driving
Interrupt handling
Memory management
Elements
Scheduler
Device drivers
Memory management routines
Cache (buffer) management
Operating System
Interface between applications and hardware
provides hardware abstraction (and protection)
Resource manager
Activity coordinator
Applications
Operating System
HARDWARE
User Level
Kernel Level
Protection
Kernel (or protected or supervisor) level
Full system access
HW devices registers
“Critical” address space regions
I/O mapping
System data
User level
Restricted system access
“Owned” address space regions
Interface
OS functions called by applications
Application Programming Interface (API)
standard routine call
library routine
Application
Library
OS
std call
Kernel level
User level
standard routine callApplication
Library
OSKernel level
User level
standard routine call
OS routineOS routine
Protection issue
func_enter_address:
<parameters validation>
<user permissions check>
func_internal_address:
<critical work>
Kernel level code
<parameters setting>
call func_enter_address
User code
OK
<parameters setting>
call func_internal_address
User codeNO(protection bypassed)
Interface
OS functions called by applications
Application Programming Interface (API)
standard routine call
system calls (syscalls)
not a standard function call
is the “door” for the kernel level
usually “wrapped” by library functions
open (library routine)
open (OS routine)
Application
Library
OS
libraries provide a
further abstraction
(abstraction from OS)
syscall
Kernel level
User level
standard routine call
System calls
Architecture dependent
software interrupt / trap
Call # Routine address
2
System routine
...
/* parameters in registers */
...
mov r7, 2 /* syscall no. */
SVC 0 /* syscall */
...
/* results managing */
...
user code
syscall table can be modified
only at kernel level
Example: ARM – Linux
System calls
Architecture dependent
software interrupt / trap
Call # Routine address
2
System routine
...
/* parameters in registers */
...
SVC 2 /* syscall */
...
/* results managing */
...
user code
syscall table can be modified
only at kernel level
Example: ARM – Linux (old ABI)