CH2 OS Structures
CH2 OS Structures
CH2 OS Structures
2025년 3월 11일
IT대학5호관(IT융복합관) 348호
COMP0312 Operating Systems 2025 Spring Semester
Hardware
COMP0312 Operating Systems 2025 Spring Semester
• Touch-screen Interface
COMP0312 Operating Systems 2025 Spring Semester
System Calls
• System calls: Interface to OS services in the form of routines (library functions or APIs)
• Example of how system calls are used:
file names?
▪ Suppose a cp program that reads data from one file and
copy to another file abc.txt, def.txt
OS Implementation
• Implementing in assembly language
▪ tedious, difficult, error-prone, difficult to port
• Implementing in high-level language
▪ Advantages
► Faster implementation time
► Compact and easier to understand/debug
► Improved complier will improve the generated code
► Easier to port
→ Linux is mostly in C, no need to emulate, runs natively
▪ Disadvantages
► Performance: potentially sub-optimal code generation
→ Not true in today’s compiler technology
→ complier is better at handling complex dependencies
► Compromise
→ small critical code can be first written in high-level language and later replaced with the
optimized ones
COMP0312 Operating Systems 2025 Spring Semester
• Advantage
▪ simplicity → easy to debug and verify system
► nth layer can be debugged without worrying about layers above and assuming n-1th layer is
correct
• Disadvantage
▪ Defining (the functionalities of) layers is difficult
▪ Less efficient
► Crossing layers may add overhead
COMP0312 Operating Systems 2025 Spring Semester
Microkernels
• Approach
▪ Reduction of complexity (Smaller kernel) -
Let’s structure OS by removing all
nonessential components from the kernel and
implement them as user-level programs that
reside in separate address spaces.
► Which service (component) should remain in the
kernel?
• Microkernel
▪ Main function is to provide communication
between programs and services via message
passing
• Advantages • Disadvantages
▪ Extending OS is easier ▪ Potential performance impact due to increased
► No modification to the kernel communication overhead
► Even the kernel change is small ► Messages need to be copied between services
▪ Easy to port ▪ Overhead from switching of processes
▪ More secure and reliable