๐ซ National Institute of Technology Silchar
Click to view the Question Paper

| Question | Details | Marks | CO |
|---|---|---|---|
| 1(a) | With a neat sketch, draw the process state diagram, explain various states the process may undergo from its creation to its termination. Mark all possible transitions and states and clearly explain the details of states and state-transitions. | 5 | CO1 |
| 1(b) | What is the difference between a process and a thread? | 2 | CO1 |
| 1(c) | Explain what happens when a program makes a system call. | 3 | CO1 |
| 2(a) | Consider the following page reference string: 7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1. Assume demand paging with 3 frames. How many page faults would occur for the following replacement algorithms? Show your work.โข LRU replacement โข FIFO replacement โข Optimal replacement | 6 | CO2 |
| 2(b) | Mention the various parameters (criteria) considered for CPU scheduling. | 4 | CO2 |
| 3(a) | Define the term race condition. What is the key to avoid race conditions? | 3 | CO3 |
| 3(b) | Why can't a single lock variable guarantee mutual exclusion? How does TestAndSet() achieve this? | 3 | CO3 |
| 3(c) | Name the four necessary conditions for a deadlock to hold. What is the approach commonly used to prevent each condition? | 4 | CO3 |
| 4(a) | What is TLB? What is the usage of TLB? | 2 | CO4 |
| 4(b) | Show the process of paging (conversion of logical address to physical address) with TLBs using a neat diagram. | 4 | CO4 |
| 4(c) | What is a page fault? With appropriate diagram, clearly discuss the steps involved in handling the page fault by an operating system. | 4 | CO4 |
| 5(a) | Explain SCAN disk scheduling algorithm. | 5 | CO5 |
| 5(b) | What are the advantages of the variant of linked allocation that uses a FAT to chain together the blocks of a file? | 5 | CO5 |
| 6(a) | Consider a 32-bit machine with a multi-level virtual memory system with 32-bit pointers and 4096 byte pages that supports two levels of page tables. All Page Table Entries (PTEs) are 4 bytes. (i) Show the complete format of a virtual address. (ii) How many memory operations are required to read or write a single 32-bit word? (iii) List the fields of a Page Table Entry (PTE). | 5 | CO6 |
| 6(b) | Write a C program to create a child process from its parent. Once the child process is created, immediately replace the binary image of the child process with a different task of your choice. Include all the required header files and provide appropriate documentation. You have to use fork() and exec() system calls. | 5 | CO6 |






