Open Book Component
Open Book Component
Que #1 3 Marks
Disk requests come into the disk driver for cylinders 10,22,55,2,28,12,6,40 and 38
in that order. The disk drive has 60 cylinders numbered 0 to 59 and the current head
position is 26. A seek takes 6 millisecond / cylinder moved. How much seek time is
needed for
(A) FCFS (B) SSTF
(C) SCAN (D) C – SCAN
(E) LOOK (F) C – LOOK
Que #2 3 Marks
Consider the organization of a UNIX file as represented by the inode. Assume that
there are 12 direct block pointers and a singly, doubly, and triply indirect pointer in
each node. Further, assume that the system block size and disk sector size are both
8K. If the disk block pointer is 32 bits, with 8 bits to identify the physical disk and
24 bits to identify the physical block, then
(A) What is the maximum file size supported by this system?
(B) What is the maximum file system partition supported by this system?
(C) Assuming no information other than that the file inode is already in main
memory, how many disk accesses are required to access the byte in
position 13,423,956.
Que #3 4 Marks
A multilevel feedback queue algorithm works with the following condition
Number of queues 3 (Q1,Q2 and Q3)
Scheduling algorithm Q1 R R, Q2 preemptive priority
& Q3 FCFS
Method used to upgrade a process No upgrading among queues
Method to demote a process Q1After 2 units of time, Q2 When the Priority
becomes 0 (Priority of the process reduced by 1 for every 1 units of execution in CPU, if
2 processes have the same priority then the process came first to the queue), Q3The
Process who came first to the queue will get the first chance.
Method used to determine which queue a process will enter
P1, P3 are entering through Queue #2 (Q2)
P2 & P4 are entering through Queue #1 (Q1)
Process T.CPU burst CPU burst I/O burst Priority Arrival time
P1 14 7 6 6 0
P2 13 8 1 5 1
P3 10 4 3 4 4
P4 13 8 4 4 6
Calculate Average waiting time, average turn around time, and CPU utilization
Que #4 4 Marks
Consider the following test program for an implementation of join. When parent
thread calls join on a child thread the parent does the following
1. If the child is still running the parent blocks until the child finishes
2. If the child has finished the parent continues to execute without blocking.
int x=10;
pthread_t tid[25];
void main()
{ void *fun1(void *a)
int i,j=0; {
for(i=0;i<3;i++) x = x /2 ;
{ x=x – 3;
if(fork()) x=x*3;
{ }
x=x + 5;
pthread_setPriority(tid[i],x);
pthread_create(tid[i],NULL,fun1,0);
x = x+10; void *fun2(void *a)
} {
else x = x /4 ;
{ x=x + 2;
x = x – 5; x=x*3;
pthread_setPriority(tid[i],x); }
pthread_create(tid[i],NULL,fun2,1);
x=x - 20;
}
x=x + 10;
}
for(i=0;i<3;i++)
{
pthread_join(tid[i]);
}
printf(“%d\n”,x);
}
Assume that the scheduler run threads in non-preemptive Priority scheduling (the
more the priority number the higher the priority is). Main thread is having the priority
value 5.What will be the values of x (all copies of x) after execution?
Que #5 4 Marks
Consider the following page reference string
2,3,1,2,4,5,1,2,3,4,5,2,6,2,1,2,3,1,4,5,6
How many page faults would occur for the following page fault algorithms,
assuming 3 and 4 available frames. In the beginning the frames are empty.
(A) Optimal replacement
(B) LRU replacement
(C) FIFO replacement
(D) Second chance replacement
Que #6 3 Marks
Suppose we have a computer system with 44-bit virtual address, page size of 64K,
and 8 bytes per page table entry
(A) How many pages are in the virtual address space?
(B) Suppose we use 3 level paging and arrange for all inner page tables to fit
in exactly to a single page frame. How will the bits of the address be
divided up?
(C) Suppose we have a 4GB program such that the entire program and all
necessary page tables (using 3 level pages from above) are in memory.
How much memory, in Page frames, is used by the program, including its
page table?
Que #7 2 Marks
A computer with 32-bit address uses 3 level page tables. Virtual addresses are
split into 3-bit outer and 9 bit and 9 bit inner levels and an offset (inner page table are
designed to fit exactly in one frame).
(A) How large the pages are?
(B) How many are there in the address space?
(C) How long is one entry in page table?
Que #8 4 Marks
Implement Reader – Writer problem with writer dominance using
(A) Critical region
(B) Monitor
Que #9 1 Marks
Why is the name of a file usually not stored in the file descriptor?