Save as PDF

Opens your browser print dialog — select "Save as PDF" to download.

[2]
Total No of Questions: 8
[Total No of Printed Pages: 8]

Roll No

IT-501 (GS)

B.Tech., V Semester

Examination, November 2022

Grading System (GS)

Operating System

Time : Three Hours

Maximum Marks : 70

Note: i) Attempt any five questions.

किन्हीं पाँच प्रश्नों को हल कीजिए।

ii) All questions carry equal marks.

सभी प्रश्नों के समान अंक हैं।

iii) In case of any doubt or dispute the English version question should be treated as final.

किसी भी प्रकार के संदेह अथवा विवाद की स्थिति में अंग्रेजी भाषा के प्रश्न को अंतिम माना जायेगा।

1
Explain how protection is provided for the hardware resources by the operating system? 7

व्याख्या करें कि ऑपरेटिंग सिस्टम द्वारा हार्डवेयर संसाधनों के लिए सुरक्षा कैसे प्रदान की जाती है?

b)
Suppose that a disk drive has 5000 cylinders numbered 0 to 4999. The drive is currently requesting at cylinder 143, and the previous request was at cylinder 125. The queue of pending request in the FIFO order is 86,1470,913,1774, 948,1509, 1022,1750,130 starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following disk scheduling algorithms?
  1. FCFS
  2. SSTF
  3. SCAN
  4. LOOK
7

मान लीजिए कि एक डिस्क ड्राइव में 0 से 4999 तक 5000 सिलेंडर हैं। ड्राइव वर्तमान में सिलेंडर 143 पर अनुरोध कर रही है, और पिछला अनुरोध सिलेंडर 125 पर था। FIFO ऑर्डर में लंबित अनुरोध की कतार 86,1470,913,1774 है, 948,1509, 1022,1750,130 वर्तमान शीर्ष स्थिति से शुरू करते हुए, निम्नलिखित डिस्क शेड्यूलिंग एल्गोरिदम में से प्रत्येक के लिए डिस्क आर्म सभी लंब���त अनुरोधों को पूरा करने के लिए कुल दूरी (सिलेंडर में) क्या है?

  1. FCFS
  2. SSTF
  3. SCAN
  4. LOOK
a)
In the round-robin scheduling, new processes are placed at the end of the queue, rather than at the beginning. Suggest a reason for this. 3

राउंड-रॉबिन शेड्यूलिंग में, नई प्रक्रियाओं को शुरुआत के बजाय कतार के अंत में रखा जाता है। इसका कारण सुझ���इए।

b)
Explain why wait and signal operations on semaphores need to be atomic? 4

समझाइए कि सेमाफोर पर प्रतीक्षा और सिग्नल संचालन परमाणु होने की आवश्यकता क्यों है?

c)
Show how to implement the wait() and signal() semaphore operations in multiprocessor environments using the TestandSet() instruction. The solution should exhibit minimal busy waiting. Develop pseudo code for implementing the operations. 7

TestandSet() निर्देश का उपयोग करके मल्टीप्रोसेसर वातावरण में wait() और signal() सेमाफोर संचालन को लागू करने का तरीका दिखाइए। समाधान को न्यूनतम व्यस्त प्रतीक्षा प्रदर्शित करनी चाहिए। संचालन को लागू करने के लिए pseudo कोड विकसित करें।

[3]
3. a)
Construct a Resource Allocation Graph for the following scenario. At time 't' Process P1 request for a resource X. Process P2 requests for a resource Y. Both the resources are available and they are allocated to the requesting process. At time t1 where t1>t, both the processes are still holding the resources, however process P1 request for Y which is held by P2, process P2 request for X held by P1. Will there be a deadlock? If there is a deadlock discuss the four necessary conditions for deadlock, else justify there is no deadlock. 7

निम्नलिखित परिदृश्य के लिए संसाधन आवंटन ग्राफ का निर्माण करें। समय पर 't' संसाधन X के लिए P1 अनुरोध को संसाधित करता है। संसाधन Y के लिए P2 अनुरोधों को संसा���ित करता है। दोनों संसाधन उपलब्ध हैं और उन्हें अनुरोध करने वाली प्रक्रिया के लिए आवंटित किया गया है। समय t1 पर जहाँ t1>t, दोनों प्रक्रियाएँ अभी भी संसाधनों को धारण कर रही हैं, हालाँकि P1 प्रक्रिया Y के लिए अनुरोध की प्रक्रिया करे जो P2 द्वारा आयोजित की जाती है। P2 प्रक्रिया P1 द्वारा आयोजित X के लिए अनुरोध करे। क्या कोई गतिरोध होगा? यदि गतिरोध है तो गतिरोध के लिए चार आवश्यक शर्तों पर चर्चा करें, अन्यथा कोई गतिरोध नहीं होने का औचित्य सिद्ध करें।

b)
Assume the following processes arrive for execution at the time indicated and also mention with the length of the CPU-burst time given in milliseconds.
Diagram for Question
Give a Gantt chart illustrating the execution of these processes using FCFS, Round Robin (quantum = 1), and Priority (Preemptive and Non preemptive) Calculate the average waiting time and average turnaround time for each of the above scheduling algorithm. Which algorithm will give the minimum average waiting time? Discuss. 7

निम्नलिखित प्रक्रियाओं के लिए संसाधन आवंटन ग्राफ का निर्माण करें। समय पर 't' संसाधन X के लिए P1 अनुरोध को संसाधित करता है। संसाधन Y के लिए P2 अनुरोधों को संसाधि��� करता है। दोनों संसाधन उपलब्ध हैं और उन्हें अनुरोध करने वाली प्रक्रिया के लिए आवंटित किया गया है। समय t1 पर जहाँ t1>t, दोनों प्रक्रियाएँ अभी भी संसाधनों को धारण कर रही हैं, हालाँकि P1 प्रक्रिया Y के लिए अनुरोध की प्रक्रिया करे जो P2 द्वारा आयोजित की जाती है। P2 प्रक्रिया P1 द्वारा आयोजित X के लिए अनुरोध करे। क्या कोई गतिरोध होगा? यदि गतिरोध है तो गतिरोध के लिए चार आवश्यक शर्तों पर चर्चा करें, अन्यथा कोई गतिरोध नहीं होने का औचित्य सिद्ध करें।

4. a)
What is the difference between local and global page allocation? What are their respective advantages and disadvantages? 3

स्थानीय और वैश्विक पेज आवंटन के बीच क्या अंतर है? उनके संबंधित फायदे और नुकसान क्या हैं?

b)
Compare the segmented paging scheme with the hashed page table scheme for handling large address spaces. Under what circumstances is one scheme preferable over the other? 4

बड़े एड्रेस स्पेस को संभालने के लिए हैश्ड पेज टेबल स्कीम के साथ सेगमेंटेड पेजिंग स्कीम की तुलना करें। किन परिस्थितियों में एक योजना दूसरी योजना से बेहतर है?

[5]
5. a)
Consider the following page reference string:

निम्नलिखित पेज संदर्भ स्ट्रिंग पर विचार करें:

1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6

How many page faults would occur for the following page replacement algorithm, assuming one, two, three, four, five, six or seven frames? Assume that all the frames are initially empty, so your first unique pages will all cost one fault each
  1. LRU replacement
  2. FIFO replacement
  3. Optimal replacement
7

एक, दो, तीन, चार, पाँच, छह या सात फ्रेम मानते हुए, निम्न पृष्ठ प्रतिस्थापन एल्गोरिथम के लिए कितने पृष्ठ दोष होंगे? मान लें ��ि सभी फ्रेम प्रारंभ में खाली हैं, इसलिए आपके पहले अद्वितीय पृष्ठों में प्रत्येक की एक गलती होगी

  1. LRU प्रतिस्थापन
  2. FIFO प्रतिस्थापन
  3. इष्टतम प्रतिस्थापन
b)
Consider a paging system with the page table stored in memory. If a memory reference takes 200 nano seconds, how long does a paged memory reference take? If we add associative registers, and 75 percent of all page table references are found in the associative registers, what is the effective memory reference time? (Assume that finding a pager table entry in the associative registers takes zero time, if the entry is there). 7

मेमोरी में संग्रहीत पेज टेबल के साथ पेजिंग सिस्टम पर विचार करें। यदि मेमोरी संदर्भ में 200 नैनो सेकंड लगते हैं, तो पृष्ठित स्मृति संदर्भ में कितना समय लगता है? यदि हम सहयोगी रजिस्टरों को जोड़ते हैं, और सहयोगी रजिस्टरों में सभी पृष्ठ तालिका संदर्भों का 75 प्रतिशत पाया जाता है, तो प्रभावी स्मृति संदर्भ समय क्या है? (मान लें कि सहयोगी रजिस्टरों में पेजर तालिका प्रविष्टि खोजने में शून्य समय लगता है, यदि प्रविष���टि है)।

c)
On a system with paging, a process cannot access memory that it does not own, why? How could the operating system allow access to other memory? Why should it or should it not? 4

पेजिंग के साथ एक सिस्टम पर, एक प्रक्रिया उस मेमोरी तक नहीं पहुँच सकती है जो उसके पास नहीं है, क्यों? ऑपरेटिंग सिस्टम अन्य मेमोरी तक कैसे पहुँच की अनुमति दे सकता है? ऐसा क्यों होना चाहिए या नहीं होना चाहिए?

6. a)
Which file-allocation method would you use for a system whose main task is database management? Why? 7

आप किसी सिस्टम के लिए किस फाइल-आवंटन विधि का उपयोग करेंगे जिसका मुख्य कार्य डेटाबेस प्रबंधन है? क्यों?

[7]
b)
When a file is removed, the blocks it occupies are simply placed back onto the free list. Can you see any problems with this? If so, how would you overcome them and what problems, if any, would now exist and how would you resolve these? 7

जब एक फाइल हटा दी जाती है, तो इसके कब्जे वाले ब्लॉकों को आसानी से मुक्त सूची में रखा जाता है। क्या आप इसमें कोई समस्या देख सकते हैं? यदि ऐसा है, तो आप उन्हें कैसे दूर करेंगे और कौन सी समस्याएँ, यदि कोई हैं, अब मौजूद होंगी और आप इनका समाधान कैसे करेंगे?

7. a)
Explain the indexed and linked file allocation methods. Discuss the advantages and disadvantages in those methods. Give an example for an application needing such storage allocation method. 7

इंडेक्सड और लिंक्ड फाइल एलोकेशन मेथड्स को समझाइए। उन विधियों के लाभ और हानियों की चर्चा कीजिए।

b)
Give an example for an application that could benefit from operating system support for random access to indexed files. 3

एक ऐसे एप्लिकेशन का उदाहरण दें जो अनुक्रमित फाइलों के लिए रैंडम एक्सेस के लिए ऑपरेटिंग सिस्टम समर्थन से लाभान्वित हो सकता है।

c)
Some file system allows disk storage to be allocated at different levels of granularity. For instance, a file system could allocate 4KB of disk space as a single 4KB block or as eight 512 byte blocks. How could we take advantage of the flexibility to improve performance? What modifications would have to be made to the free-space management scheme in order to support this feature? Give an example for an application needing such storage allocation method. 4

कुछ फाइल सिस्टम डिस्क स्टोरेज को विभिन्न स्तरों पर आवंटित करने की अनुमति देते हैं। उदाहरण के लिए, एक फाइल सिस्टम 4KB डिस्क स्थान को एक 4KB ब्लॉक या आठ 512 बाइट ब्लॉक के रूप में आवंटित कर सकता है। प्रदर्शन सुधारने के लिए हम लचीलेपन का लाभ कैसे उठा सकते हैं? इस सुविधा का समर्थन करने के लिए मुक्त-स्थान प्रबंधन योजना में क्या संशोधन करने होंगे? एक ऐसे एप्लिकेशन का उदाहरण दें जिसे ऐसी स्टोरेज एलोकेशन मेथड की आवश्यकता है।

8. a)
How long does it take to load 64 Kbyte program from a disk whose average seek time is 10sec, rotation time is 20msec and track holds 32 Kbytes. Calculate time when page size is 2 Kbyte and also when page size is 4 Kbyte. Assume that pages are spread around the disk and no two pages are on the same cylinder. 7

डिस्क से 64 किलोबाइट प्रोग्राम को लोड करने मे��� कितना समय लगता है जिसका औसत सीख समय 10msec है, घूर्णन समय 20msec है और ट्रैक 32 किलोबाइट रखता है। समय की गणना करें जब पेज का आकार 2 किलोबाइट हो और जब पेज का आकार 4 किलोबाइट हो। मान लें कि पेज डिस्क के चारों ओर फैले हुए हैं और एक ही सिलेंडर पर दो पेज नहीं हैं।

b)
Given a disk with 200 tracks, where track requests are received in the following order:

55, 58, 39, 18, 90, 160, 150, 38, 184.

The starting position for the arm is track 100. Calculate the number of tracks crossed when the following algorithms are used
  1. First Come First Serve
  2. Shortest Seek First
  3. The elevator algorithm starting in the direction arm is to move towards greater track number.
7

200 ट्रैक वाली एक डिस्क दी गई है, जहाँ ट्रैक अनुरोध निम्न क्रम में प्राप्त होते हैं:

55, 58, 39, 18, 90, 160, 150, 38, 184.

आर्म के लिए प्रारंभिक स्थिति ट्रैक 100 है। निम्न एल्गोरिदम का उपयोग करने पर क्रॉस की गई पटरियों की संख्या की गणना करें।

  1. फर्स्ट कम फर्स्ट सर���व
  2. शॉर्टेस्ट सीक फर्स्ट
  3. लिफ्ट एल्गोरिदम दिशा में शुरू हो रहा है।