Final Exam - OS Dec18-19 PDF
Final Exam - OS Dec18-19 PDF
Final Exam - OS Dec18-19 PDF
INSTRUCTIONS:
• Attempt ALL questions using the space provided after each question
• This is closed book exam
• No break during the exam
• No E-Dictionaries and mobiles are allowed
Course Outcomes
A. Understand the internals of the machine and how the OS and the hardware cooperate to present a
convenient (and efficient) system to the user.
B. Identify the major types and components of OS
C. Identify the different design problems related to OS.
D. Master OS concepts like resource management, virtualization, processes and their interaction, and file
systems.
E. Understand, implement and evaluate the major algorithms needed in modern OS such as scheduling
and deadlock algorithms.
F. Understand, implement and evaluate the main algorithms of main memory and file management
used in modern OS.
A 10 Q1
B 8 Q2
C 9 Q3
D 6 Q4
E 6 Q5
F 6 Q6
Total 45
TRUE/FALSE Statement
In Ubuntu, the return value for the fork system call is non-zero for the child
process and zero for the parent process.
The state of a process is defined as the activity that will be executed next by the
process.
The turnaround time is the total waiting time for a process to finish execution.
In paging system, the logical memory is divided into frames and the physical
memory is divided into pages.
The segment of code in which the process may change common variables,
update tables, or write into files is known as critical section.
c. 1, 5
d. 0, 111
[2 marks] ii. Describe a situation when the mechanisms of pure paging and demand paging systems have no
difference. Explain
[4 marks] iii. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in order), how would each
of the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB (in order)? Which algorithm makes
the most efficient use of memory?
[3 marks] ii. In the operating systems, there are two main approaches to kernel design: preemptive kernels and
nonpreemptive kernels. Describe two advantages of preemptive kernels over nonpreemptive ones.
[3 marks] iii. Consider the following code in which P and Q are two processes sharing a common semaphore, called
sem initialized to 0. Describe the outcome and the advantage of the following use of semaphore.
P:
cout<<”Hello Sharjah”;
signal(sem);
Q:
wait(sem);
cout<<”Hello Abu Dhabi”;
a) First Come First Serve (FCFS) b) Shortest Seek Time First (SSTF)