
시스템 콜(System Call)이란?

* 인터럽트(interrupt): 시스템에서 발생한 다양한 종류의 이벤트 혹은 그런 이벤트를 알리는 매커니즘
- 전원(power)에 문제가 생겼을 때
- I/O 작업이 완료되었을 때
- 시간이 다 됐을 때(timer 관련)
- 0으로 나눴을 때
- 잘못된 메모리 공간에 접근을 시도할 때
🤔 커널 모드는 왜 존재하는가?
시스템을 보호하기 위해 user mode에서 하드웨어를 건드리른 상황을 방지하기 위해서
예시) 파일을 복사하는 과정

* 모든 단계 system call 필요
시스템 콜의 종류
Process Control
- end
- abort
- load
- execute
- create process
- terminate process
- get process attributes
- set process attributes
- wait for time
- wait event
- signal event
- allocate and free memory
File Manipulation
- create file
- delete file
- read
- write
- reposition
- get file attributes
- set file attributes
Device Manipulation
- request device
- release device
- read
- write
- reposition
- get device attributes
- set device attributes
- logically attach or detach devices
Information Maintenance
- get time or date / set time or date
- get system date / set system data
- get process, file, or device attributes
- set process, file, or device attributes
Communications
- create, delete communication connection
- send, receive messages
- transfer status information
- attach or detach remote devices
참고자료
- 인터럽트와 시스템 콜을 설명합니다! 당연히 유저 모드, 커널 모드도 설명해야겠죠? 그런데 이 모든게 프로그래밍 언어와 무슨 상관이냐구요?? 상관있죠! 왜 상관있냐면요..! - 쉬운 코딩
- System Calls - Neso Academy
- Types of System Calls - Neso Academy
'운영체제' 카테고리의 다른 글
[가상메모리] 페이지 테이블 - 주소 번역 / 페이지 적중 & 오류 (3) | 2024.07.16 |
---|---|
[PintOS] System Call을 실행하는 과정 (5) | 2024.07.16 |
Threads는 어떻게 실행될까? : Alarm Clock, Priority Scheduling (0) | 2024.07.16 |
[wiki용] PintOS 키워드 정리(중...) (1) | 2024.07.16 |
동적 메모리 할당 - 배치: first-fit, next-fit, best-fit (2) | 2024.07.16 |