Operating System Services
User interface
Program execution
I/O operation
File-system manipulation
Communications
Error detection
Resource allocation
Logging
Protection and security

System Call
Programming interface to the services provided by the Operating System
Mostly accessed by programs via a high-level API rather than direct system call use
Typically, a number associated with each system call (System-call interface maintains a table indexed according to these numbers)
Most details of OS interface hidden from programmer by API
1. User application call API
2. API call corresponding system call (interrupt)
3. CPU saves current process' state into the PCB block and give CPU resource to OS
4. OS jumped to kernel mode
5. OS dispatch the interrupt with corresponding interrupt handler by using interrupt vector
6. After the system call finished, it makes interrupt to the interrupt request line in CPU
7. CPU check it and restored the original process state in PCB block
8. The original process gets CPU resource and continues the code

System Call Parameter Passing
Methods :
Pass the parameters in register
Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register
Parameters placed or pushed onto the stack by the program and popped off the stack by the operating system

Types of System Calls
Process control, File management, Device management, Information maintencance, Communications, Protection
System Services
File manipulation
Status information sometimes stored in a file
Programming language support
Program loading and execution
Communications
Background services
Application programs
Most users’ view of the operation system is defined by system programs, not the actual system calls
Linker and Loader
Relocatable object file : source code compiled into object files designed to be loaded into any physical memory location
Linker : conbines relocatable object file into single binary executable file
Loader : loads executable file into memory and, set up program counter into entry point of executor file

Operating System Structure
Monolithic Structure (Original UINX) : consists of Systems programs and the kernel (Provides the file system, CPU scheduling, memory management, and other operating-system functions)

Layered Approach : The operating system is divided into a number of layers (levels), each built on top of lower layers
With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers

Microkernels : Moves as much from the kernel into user space
Benefits : Easier to port the operating system to new architectures
Detriments : Performance overhead of user space to kernel space communication

Modules : Uses object-oriented approach, Each core component is separate, Each talks to the others over known interfaces
'Operating System Design' 카테고리의 다른 글
| Operating System Design - Threads & Concurrency (0) | 2021.06.17 |
|---|---|
| Operating System Design - Processes (0) | 2021.06.17 |
| Operating System Design - File System Implementation (0) | 2021.06.16 |
| Operating System Design - I/O Systems (0) | 2021.06.16 |
| Operating System Design - Virtual Memory (0) | 2021.06.15 |