0% found this document useful (0 votes)
34 views8 pages

Os Pyq 6

It's a pyq

Uploaded by

nagpalvirender60
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
34 views8 pages

Os Pyq 6

It's a pyq

Uploaded by

nagpalvirender60
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
ey Vv 33/109 ‘this question paper contains 8 printed pages] i g,No. of Question Paper : 49 Unique Paper Code > 32341302 I Name of the Paper : Operating Systems Name of the Course : B.Sc. (H) Computer Science Semester : 1 Duration : 3 Hours Maximum Marks : 75 (Write your Roll No: on the top immediately on receipt of this question paper.) Question No. 1 of 35 marks is compulsory. Attempt any four questions. from Q. Nos. 2 to % 1. @__ Fill in the following blanks : : ACS () The two modes of execution of an’ operating «and .... system are... ... provide(s) an: interface to the services (i provided by an operating system. (iii) A necessary condition for a deadlock which ‘states that a resource held by a process cannot be taken ‘ away forcibly .... PTO. Scanned by CamScanner () @ © .@), % . scheduling is approximated by Predicting the next CPU burst with an exponential Average | of the measured lengths of previous CPU bursts, (vy) The mapping of a logical address to a physica, address is done in hardware by the What is a file allocation table ? 2 Differentiate between : : 4 () binary semaphore and mutex (i) “counting semaphore and binary semaphore ? What is a bootstrap program ? Where is it stored ? a Given five memory partitions of sizes 750 KB, 575 KB, 225 KB, 510 KB, 300 KB (in order). How would the best-fit algorithm place processes of sizes 450 KB, 540 KB, 200 KB, and 560 KB (in order) ? 2 What are the advantages of using loadable kernel modules ? 7 : , 2 Which of the following scheduling algorithms could result in starvation ? Justify your answer : 2 () First-come, first-served (ii) Shortest job first (iit) Round robin (iv) . Priority, Scanned by CamScanner ee (iy Given that the actual pids of the parent and child in the following poser fragment are 1500 and 1700 respectively, identify the pids at lines (a), (b), (c) and (ad) (assume that fork is eeccuttd successfully) : 4 { pid_t pidl, pid2; pid! = fork(); if (pidl == 0){ pid2 = getpidy; printf("pidl = %d", ‘pidl); may ‘printf("pid2 = %d", pid2); * (b) */ : else{ pid2 = getpid(); printf("pidl = %d", pidl); Mc) *4 printf("pid2 = %d", pid2); /* (@) 9 */ wait (NULL); } P.T.O. Scanned by CamScanner ” ® - @ (m) @ What is the use of pthread_join( )-function > 5 nee a logical address space of 128 pages with 2 KB page size, mapped onto a ‘physical memory op 64 frames = 3 () How many bits are required in the logica| address .? (i) How many bits are required in the physical address ?. Assume a program has just referenced an address in virtual memory. Which of the following scenarios can occur and which cannot. Justify your answer : ' 3 () TLB hit and page fault (if) TLB miss with no page fault, What is a mount point ? 2 Describe the in-memory structures for file system “management. : 2. ‘Compare client-server computing and peer to peer computing. S 3 () © 37 7 -@ (6) Consider the following code segment : pid_t pid; pid = fork()i if (pid == 0){ fork()i ‘thread_create( 6 9 de } fork(); () How many -unique processes are created ? (i) How many unique threads are created ? What are the three mechanisms for implementing index block for large files in the indexed allocation scheme ? 3 Differentiate between internal and external fragmentation. Which of the’ following memory organization schemes suffer from ‘external fragmentation : contiguous memory allocation, paging. Give arguments ‘to support syour answer. ie 243 Describe the Readers Writers synchronization problem. Suggest the process structures ‘to solve this nen 5 PTO. Scanned by CamScanner * 4 (a) Consider the following set of processes, with, the len ©) _memory reference takes 150 nanoseconds. (Ass of the CPU burst given in milliseconds. Given tha order of arrival of the processes is PI, P2, p3 and p, (all at time zero), determine the average wel time of .each ; process for the following Scheduling algorithms : 5 (i) SJF (non-preemptive) (i) ‘RR, (quantum = 2)” . Process Burst Time PI 4 P2 3 P3 9 P4 6 How many. memory accesses are required in the case of a TLB hit and TLB miss.? Consider a paging system with the page’ table. stored in TLBs, Given. that 9 percent of the page references are found in the TLBs, determine the effective memory. reference time if @ ume that finding a page-table entry in. the TLBs takes zero time, if the éntry is there.) i 2909 F 5, (a ® (c) 6. (a) ® ice) 49 Two processes PI and P2 are simultaneously accessing the following code. Demonstrate the impact of race condition. in this scenario : 3 xem 1 Func( ) { Ti (x ==0) What do you understand by Jocality of' reference ? Explain the working set model to avoid thrashing. 3 List the different types*of directory structures giving one advantage of each. . 4 Explain the following in the context. of demand paging : : 4 () _Belady's anomaly (ii) copy-on-write. Assuming a 2 KB page size, what are the page numbers and offsets for the following address references provided as decimal numbers (assume /that the page numbers begin with zero) : 2 () 7825 (i) 17239. PTO. Scanned by CamScanner 9 () @ (@) ® © For a 32 bit logical address, calculate the number a9 bits in the page number and page offset fields Biven that the page size is 2 KB. 2 Would it be appropriate to have a web server run ag a single-threaded process ? Why or why not? 9 Write two methods that implement the wait( ) and signal( ) operations for a semaphore s. 4 Consider the following page reference string : 4 9, 5, 3, 6, 5, 8 2, 1, % 9,0, 7. Assuming demand paging with four frames, how many page faults would occur for the following replacement algorithms ? ; * FIFO replacement * — Optimal replaéement. Justify that the mutual exclusion condition is necessary for a deadlock to occur. F 2

You might also like