Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 2 : Operating System Structure (OS structure (3.layered (layer 0 :…
Chapter 2 :
Operating System Structure
OS Services
I/O operations
File system manipulation
Program execution
Communication
User interface
command line (CLI)
2.GUI
touch screen
Error detection
System Calls
Programming interface to services provided by the OS
high level language : C or C++
mostly accessed by programs via Application Programming Interface (API)
system call implimentation
need to obey API & understand what OS will do as the result
details of OS interface hidden from programmer by API
types of system calls
process control
create & terminate process,load,execute,wait for time etc
file management
create & delete file,open close file,read write reposition
device management
request & release device,read write reposition,logically attach or detach devices
information maintenance
communication
create delete comm connection
transfer status information
protection
OS structure
1.simple
MS DOS
2.complex
3.layered
layer 0 : hardwares
layer N : user interface
divided into layers
4.microkernel
moves from kernel into user space
example: Mac OS X kernel
benefits: easy to extend microkernel, more secure
5.hybrid
combines multiple approaches to address performance,security,usability needs
6.traditional
6.monolithic-original UNIX
UNIX-limited by hardware functionality
systems of program
kernel
consist of everything below the syst call interface&above physical hardware
provide file system,CPU scheduling,memory management
System boot
power initialized on system,execution starts at a fixed memory location
piece of code
bootstrap loader,BIOS stored in ROM/EEPROM locates the kernel
BIOS
kernel loads & system is running
OS debugging
debug- find and fix errors. also performance tuning
OS generate log files containing error information
failure of an app can generate
crash dump
file containing kernel memory
beyond crashes,performance tuning can optimize syst performance
trace listing
collect data for specific event
tools
1.strace-trace system call invoke by a process
2.gdb-source level debugger
3.perf-collection of Linux performance tools
4.collects network packets
profiling
periodic sampling of instruction pointer to look for statistical trends
BCC
debug interactions btwn user&kernel code nearly impossible without toolset tht understands both & instrument their actions
BPF compliler collection
rich toolkit provide tracing for Linux