Nothing Special   »   [go: up one dir, main page]

Paper 5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Seat No.: ________ Enrolment No.

___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER–IV (NEW) - EXAMINATION – SUMMER 2018
Subject Code:2140702 Date:28/05/2018
Subject Name:Operating System
Time:10:30 AM to 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
MARKS
Q.1 (a) Define following Terms: 03
Mutual Exclusion ,Thrashing , Thread
(b) Give the functions of following UNIX commands: 04
grep, cat, cmp, chmod
(c) What is Process? Draw Five State Process Model and Explain it. 07

Q.2 (a) Give the Difference between Multi-Programming, Multi-tasking , 03


Multiprocessing System.
(b) Write different operating system services. 04
(c) Consider Five Processes P1 to P5 arrived at same time. They have 07
estimated running time 10,2,6,8 and 4 seconds, respectively. Their
Priorities are 3,2,5,4 and 1, respectively with 5 being highest Priority.
Find the average turnaround time and average waiting time for Round-
Robin(q=3) and Priority Scheduling algorithm.
OR
(c) What Critical section Problem and list the requirements to solve it. Write 07
Peterson’s Solution for the same.

Q.3 (a) What is Semaphore? Give the implementation of Readers-Writers 03


Problem using Semaphore.
(b) What is deadlock? List the conditions that lead to deadlock. 04
(c) Consider the snapshot of the system with Five Processes and Four types 07
of resources A,B,C,D.
Allocation Max
A B C D A B C D
P0 0 0 1 2 0 0 1 2
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6
Currently Available set of resources is (1,5,2,0). Answer the following
Questions using bankers algorithm.
1) Find the content of Need Matrix.
2) Is the System in Safe State?
3) If request from Process P1 arrives for (0,4,2,0) can the request be
granted immediately
OR

Q.3 (a) List Deadlock Recovery Techniques and explain one of them. 03
(b) What is Monitor? Write Solution to Dining-Philosopher problem using 04
monitor.
(c) Explain concept of virtual memory and paging with example. 07
1
Q.4 (a) Explain Difference between Internal and External Fragmentation. 03
(b) Draw the block diagram for DMA. Write steps for DMA data transfer. 04
(c) Given six Partition of 300KB, 600KB, 350KB, 200KB, 750KB and 07
125KB(in order),how would the first-fit, best-fit and worst-fit algorithms
places processes of size 115 KB,500KB,358KB,200KB AND 375KB(in
order)?Which algorithm is efficient for the use of memory?
OR
Q.4 (a) Consider paging system with TLB, all page reference are found 75% 03
times the TLB, if 100ns are required for single memory reference, then
calculate the effective memory access time? (ignore TLB search time)
(b) Explain concept of Demand Paging in memory management. 04
(c) Consider the following page reference string: 07
1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2
With four Frames How many page faults would occur for the FIFO,
Optimal page replacement algorithms? which algorithm is efficient?
(assume all frames are initially empty)

Q.5 (a) Explain the use of Controller in I/O transfer. 03


(b) Write a shell script to find greater number out of 3 numbers. 04
(c) Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive 07
is currently serving a request at cylinder 143,. The queue of pending requests,
in FIFO order,
86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130
Starting from current head position what is total distance (in cylinders)
that disk arm moves to satisfy all the pending request for FCFS and SSTF
disk scheduling algorithm?
OR
Q.5 (a) List and Explain different File Attributes. 03
(b) Explain domain protection mechanism in brief 04
(c) Explain Contiguous and Linked File Allocation Methods 07

*************

You might also like