본문 바로가기

Operating system

System Calls

  • OS defines a set of system calls (OS는 일련의 시스템 호출을 정의한다.)
    • Programming interface to the services provided by OS (OS에서 제공하는 서비스에 대한 프로그래밍 인터페이스)
    • OS protects the system by rejecting illegal requests (OS는 불법 요청을 거부하여 시스템을 보호한다.)
    • OS may impose a quota on a certain resource (OS는 특정 리소스에 할당량을 부과할 수 있습니다.)
    • OS may consider fairness while sharing a resource (OS는 리소스를 공유하면서 공정성을 고려할 수 있습니다.)
  • A system call is a "kernel" procedure call (시스템 호출은 커널 프로시져 호출입니다.)
  • 더보기
    procedure call은 프로시저 이름을 명시하고, 괄호 안에 실제 매개 변수 이름 또는 값을 나열하고, 마지막 세미콜론을 추가하여 만든 간단한 문입니다. 
    • System call routines are in the OS code (시스템 호출 루틴은 OS코드에 있다.)
    • Executed in the kernel mode (커널 모드에서 실행된다.)
    • On entry, user mode -> kernel mode switch (진입 시, 사용자 모드 -> 커널 모드로 변경)
    • On exit, CPU mode is changed back to the user mode (종료 시, CPU모드는 사용자 모드로 변경)
더보기

words i didn't know

protects : 보호하다

rejecting : 거부

impose : 부과하다

quota : 값, 몫

consider : 고려하다

fairness : 공정성

Execute : 실행하다

 

System calls Example

 

OS Trap

There must be a special "trap" instuction that (다음과 같은 특별한 지시가 있어야 함)

  • Causes an exception, which invokes a kernel handler (예외를 발생시켜 커널 핸들러를 호출합니다.)
  • Passes a parameter indicating which system call to invoke (어떤 시스템 호출을 실행할 것인지를 나타내는 매개변수를 전달)
  • Saves caller's state (발신자 상태를 저장한다)
  •  Returns to user mode when done with restoring its state (상태 복원이 완료되면 사용자 모드로 돌아감)
  • OS must verify caller's parameters (OS에서 호출자의 매개변수를 확인해야 함)
더보기

words i didn't know

 

causes : 발생하다

indicationg : ~을 나타내는

verify : 검증하다(확인하다)

 

 

 

'Operating system' 카테고리의 다른 글

절대 주소와 상대 주소  (0) 2023.09.18
메모리 관리와 소스코드의 번역 & 실행  (0) 2023.09.18
교착 상태  (0) 2023.06.05
CPU 스케줄링  (0) 2023.06.04
스레드 (thread)  (0) 2023.04.23