반응형
안녕하세요. 오늘은 System call에 대해서 알아볼까 합니다.
2021.11.01 - [학부공부/운영체제] - 03. 운영체제 구조(1)
이 포스팅에서 커널이 무엇이고 왜 Kernel mode와 User mode가 필요한지에 대해 알아보았었습니다. 그리고 User mode에서 Kernel mode로 진입하는 통로로 System call에 대해서 간단히 설명했었는데요. 오늘은 System call에 대해 다뤄볼까 합니다.
06.01. CPU Modes
Kernel mode vs. user mode
The architecture must support at least two modes of operation: kernel and user mode
Levels | |
4 privilege levels in IA-32 | Ring 0 > 1 > 2 > 3 |
4 privilege levels in ARM | EL3 > EL2 > EL1 > EL0 |
3 privilege levels in RISC-V | Machine > Supervisor > User |
Mode is set by a status bit in a protected register
- IA-32: Current Privilege Level (CPL) in CS register
- ARM: Mode field in CPSR register
Protected instructions can only be executed in the corresponding privileged level.
06.02. System call
OS defines a set of system calls
- Programming interface to the services provided by OS
- OS protects the system by rejecting illegal requests
- OS may consider fairness while sharing a resource
- System call routines are in the OS code
- Executed in the kernel mode
- On exit, CPU mode is changed back to the user mode
Implementing System Calls
반응형
'학부공부 > OS_운영체제' 카테고리의 다른 글
08. 운영체제와 컴퓨터 구조(1) (0) | 2021.11.08 |
---|---|
07. Hypervisor [Interesting topic to study] (0) | 2021.11.02 |
05. Multics vs Unix [Interesting topic to study] (0) | 2021.11.02 |
04. 운영체제 구조(2) (0) | 2021.11.02 |
03. 운영체제 구조(1) (0) | 2021.11.01 |
댓글