Docsity

Tutorial chap3 and ch5 (process scheduling), Assignments of Operating Systems

Toggle sidebar
bg1
CpE 445 Operating Systems
HW2
1
1. Contrast and compare an application programming interface (API) and an application
binary interface (ABI).
2. Why is the separation of mechanism and policy desirable?
3. What is the main advantage of the microkernel approach to system design? How do user
programs and system services interact in a microkernel architecture? What are the
disadvantages of using the microkernel approach?
4. Including the initial parent process, how many processes are created by the program
shown in the below figure?
5. Describe the actions taken by a kernel to context-switch between processes.
6. What are the benefits and the disadvantages of each of the following? Consider both the
system level and the programmer level.
a. Synchronous and asynchronous communication
b. Automatic and explicit buffering
c. Send by copy and send by reference
d. Fixed-sized and variable-sized messages
pf2

Partial preview of the text

Download Tutorial chap3 and ch5 (process scheduling) and more Assignments Operating Systems in PDF only on Docsity!

CpE 445 Operating Systems

HW

1

  1. Contrast and compare an application programming interface (API) and an application binary interface (ABI).
  2. Why is the separation of mechanism and policy desirable?
  3. What is the main advantage of the microkernel approach to system design? How do user programs and system services interact in a microkernel architecture? What are the disadvantages of using the microkernel approach?
  4. Including the initial parent process, how many processes are created by the program shown in the below figure?
  5. Describe the actions taken by a kernel to context-switch between processes.
  6. What are the benefits and the disadvantages of each of the following? Consider both the system level and the programmer level. a. Synchronous and asynchronous communication b. Automatic and explicit buffering c. Send by copy and send by reference d. Fixed-sized and variable-sized messages

CpE 445 Operating Systems

HW

2

  1. Consider the following set of processes, with the length of the CPU burst time given in milliseconds: Process Burst Time Priority P 1 2 2 P 2 1 1 P 3 8 4 P 4 4 2 P 5 5 3 The processes are assumed to have arrived in the order P 1 , P 2 , P 3 , P 4 , P 5 , all at time 0. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, non-preemptive priority (a larger priority number implies a higher priority), and RR (quantum = 2). b. What is the turnaround time of each process for each of the scheduling algorithms in part a? c. What is the waiting time of each process for each of these scheduling algorithms? d. Which of the algorithms results in the minimum average waiting time (over all processes)?
  2. What advantage is there in having different time-quantum sizes at different levels of a multilevel queueing system?
  3. Most scheduling algorithms maintain a run queue, which lists processes eligible to run on a processor. On multicore systems, there are two general options: (1) each processing core has its own run queue, or (2) a single run queue is shared by all processing cores. What are the advantages and disadvantages of each of these approaches?
  4. Which of the following scheduling algorithms could result in starvation? a. First-come, first-served b. Shortest job first c. Round robin d. Priority