Professional Documents
Culture Documents
OS Services - OS Operations - Services System Calls OS Structure - System Boot
OS Services - OS Operations - Services System Calls OS Structure - System Boot
Module 1
OS Services –OS Operations - Services System Calls
OS Structure - System Boot
– Resource allocation
– Accounting
– Protection and security
6
OS - User services
User interface
Program execution
– The system must be able to load the
program in memory and execute
7
OS - User services
I/O operation
Communication
Error detection
Resource allocation
–multiple users running at the same time
-resources must be allocated to all
• Main memory
• File storage
• CPU cycles
11
OS - System related services
Accounting
Keeps track of
-users activity
-resource allocation
- utilization
Operating-System Operations
Operating-System Operations 14
Source: WIkipedia
18
Systems Calls
System calls
19
Sets the
-System call number
-C arguments into the general registers
-Executes some machine instruction that generates a software
interrupt in the kernel
21
Example on how system calls are used
Simple program to read data from one file and copy them to another file
Program inputs
-Name of two files
-opens the input file and creates output file and open it
Now that both files are setup, enter into the loop that
-read from input file (system call) and
-writes into the output file(another system call)
Example of System Calls 22
Most modern operating systems are actually not one pure model
Hybrid combines multiple approaches to address performance, security,
usability needs
Linux and Solaris kernels in kernel address space, so monolithic, plus
modular for dynamic loading of functionality
Windows mostly monolithic, plus microkernel for different subsystem
personalities
Apple Mac OS X hybrid, layered, Aqua UI plus Cocoa programming
environment
Below is kernel consisting of Mach microkernel and BSD Unix parts, plus
I/O kit and dynamically loadable modules (called kernel extensions)
Mac OS X Structure
43
iOS 44
System Boot
System Boot 48
ns ?
e st io
y Q u
A n
50
References
http://www.digilife.be/quickreferences/qrc/linux%20system%20call%
20quick%
http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html
51
You!
hank
T