Os Theory Questions
Os Theory Questions
Os Theory Questions
Q1: Define Opera ng system and What are the three main purposes of an opera ng system?
Q2: What is the purpose of interrupts? How does an interrupt differ from a trap? Can traps be
generated inten onally by a user program? If so, for what purpose?
Q3: Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU’s
execu on load.
a. How does the CPU interface with the device to coordinate the transfer?
b. How does the CPU know when the memory opera ons are complete?
c. The CPU is allowed to execute other programs while the DMA controller is transferring data. Does
this process interfere with the execu on of the user programs? If so, describe what forms of
interference are caused.
Q4: What are some advantages of peer-to-peer systems over client–server systems?
Q5: What is the main advantage of the layered approach to system design? What are the
disadvantages of the layered approach?
Q7: What are the two models of interprocess communica on? What are the strengths and
weaknesses of the two approaches?
Q8: When a process creates a new process using the fork() opera on, which of the following states
is shared between the parent process and the child process?
a. Stack
b. Heap
Q10: 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 communica on
Q11: What are two differences between user-level threads and kernel-level threads? Under what
circumstances is one type be er than the other?
Q12: Describe the ac ons taken by a kernel to context-switch between kernel-level threads.
Q13: What resources are used when a thread is created? How do they differ from those used when
a process is created?
Q14: Using Amdahl’s Law, calculate the speedup gain for the following applica ons:
• 40 percent parallel with (a) eight processing cores and (b) sixteen processing cores
• 67 percent parallel with (a) two processing cores and (b) four processing cores
• 90 percent parallel with (a) four processing cores and (b) eight processing cores
pid_t pid;
pid = fork();
if (pid == 0)
{ /* child process */
fork();
} fork();
Q16: What advantage is there in having different me-quantum sizes at different levels of a
mul level queueing system?
Q17: Consider the exponen al average formula used to predict the length of the next CPU burst.
What are the implica ons of assigning the following values to the parameters used by the algorithm?
Q18: What is the meaning of the term busy wai ng? What other kinds of wai ng are there in an
opera ng system? Can busy wai ng be avoided altogether?
Q20: What is a scheduler? How it is different from dispatcher? Explain different types of scheduler.
Q21: What is process? How it differ from program? Explain PCB in detail.
Q22: What are the criteria to measure the performance of scheduling algorithm? Explain.
Q25: What is cri cal sec on problem and race condi on?
Q26: Explain the necessary condi ons for process synchroniza on.
Q27: What is peterson's solu on? And it can not be used as general algorithm for n processes.
Q28: What are classical process synchronisa on problems, solve them using semaphores.
Q29: What is deadlock? What are the necessary condi ons to occur deadlock?