Professional Documents
Culture Documents
2021 1 OS43 중간시험문제 1
2021 1 OS43 중간시험문제 1
- A/An (① ) is the programmatic way in which a computer program requests a service from
the kernel of the operating system it is executed on. They provide an essential interface between a
process and the operating system.
- When a device completes its operation, the device controller informs the device driver that it has
finished its operation. This is accomplished via a/an (② ).
- The hardware allows (③ ) instructions to be executed only in kernel mode. If an attempt is made to
execute a/an (③ ) instruction in user mode, the hardware does not execute the instruction, but rather
treats the instruction as illegal and traps it to the operating system.
- A/An (④ ) loads an operating system into memory, performs initialization, and begins
system execution.
- A process is said to be in (⑤ ) state, when it is waiting to be assigned to a processor with
all the resources it needs for execution.
- An important performance measure of interactive system is the time from the submission of a
request until the first response is produced. This measure is called a/an (⑥ ).
- In a multiprogramming or multitasking system, each process can have a segment of code, called
a/an (⑦ ), in which the process may be accessing or updating data that is shared with at
least one other process.
- Linux provides two simple system calls, preempt_disable() and preempt_enable(), for disabling and
enabling (⑧ ) preemption.
- Multiple processes are permitted to concurrently acquire a/an (⑨ ) lock in read-mode, but only one
process may acquire the lock for writing, as exclusive access is required for writers.
- Deadlock can be avoided by using the Dijkstra’s or Habermann’s algorithm, which does not grant
resources if doing so would lead the system into a/an (⑩ ) state.
[용어 box]
[답]
① ② ③ ④ ⑤
⑥ ⑦ ⑧ ⑨ ⑩
2/3
[답]
⑶ 3개의 ready queue Q0, Q1, Q2를 가지고 아래 규칙에 따라 운영되는 MFQ(Multi-level Feedback Queue)
스케줄링 기법을 가정한다.
① Process P1, P2, P3, P4가 CPU burst를 종료하는 시점은 각각 언제인가?
② Process P1, P2, P3, P4의 waiting time은 각각 얼마인가?
③ 이들 4개 process의 평균 turnaround time은 얼마인가?
P1
P2
P3
P4
3/3
② 코드-1의 문제점을 보완하기 위하여 코드-2가 제시되었다. 코드-2에서 코드-1의 문제점을 어떻게
해결하였는지 설명하시오.
⑸ 5개의 process P1, P2, P3, P4, P5와 3종류의 resource type A(4 units), B(10 units), C(10 units)가 존재하는
시스템을 가정하자. Deadlock avoidance 기법(Habermann algorithm)을 적용한다고 가정하고, 각 process의
Max Claim과 Current Allocation이 아래와 같을 때, 이 상태가 safe인지 unsafe인지 보이시오. Safe인 경우
safe sequence를 보이고, unsafe인 경우 그 이유를 명확하게 설명하시오.
끝. 수고했습니다.