컴퓨터/운영체제

[OS] Operating System Structures (part2)

xeskin 2020. 3. 25. 21:49
반응형

*본 포스팅은 2020학년 1학기 홍석인 교수님의 운영체제 수업을 두서없이 정리한 것임을 밝힙니다.

 

System call interface에서 파라미터를 OS에게 주는 방법은 세가지가 있음

- The simplest approach: pass the parameter in registers

CPU의 register 갯수는 한정돼있음. 그런데, 파라미터의 갯수는 많기 때문에 적절하지 않은 접근법임

- Block method: Parameters are stored in a block (memory), and the address of the block is passed as a parameter in register

(eg. printf("hello")의 경우 hello를 메모리에, address를 register에 저장하는 거 생각해보면 된다)

- Stack method: Parameters also can be placed, or pushed, onto the stack by the program and popped off the stack by the operating system

 

System Call Types (5가지가 있음)

- Process control

  a. create or terminate process

  b. load, execute

  c. end (normally), abort (abnormally)

  d. get/set process attributes (eg. priority)

  e. wait event, signal event

  f. allocate and free memory

- File management

  a. create file, delete file

  b. open file, close file

  c. read, write, reposition

  d. get file attributes, set file attributes (attribute: file name, type, permissions, type, owner)

- Device management

  a. request device, release device

  b. read, write, reposition

  c. get device attributes, set device attributes

  d. logically attach or detach devices

(UNIX계열의 운영체제에서는 file, device management를 유사한 방법으로 사용 > device를 하나의 file로 추상화하여 사용하기 때문)

- Information maintenance

  a. get time or date, set time or date

  b. disk space, the amount of free memory, list of users, version info

- Communication

  a. create, delete communication connection

  b. send, receive messages

 

 

 

반응형

'컴퓨터 > 운영체제' 카테고리의 다른 글

[OS] Thread (1)  (0) 2020.04.16
[OS] Inter Process Communication (IPC)  (1) 2020.04.15
[OS] Context Switch와 레지스터 셋의 관계  (0) 2020.04.15
[OS] Interrupt  (0) 2020.04.03
[OS] Operating System Structures (part1)  (0) 2020.03.23