Threads of a process share
global variables but not heap
heap but not global variables
neither global variables nor heap
both heap and global variables
operating systems
GATE 2017 SET 1
operating systems
GATE 2015 SET 1
Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of
an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20
milliseconds, respectively. The priority of each task is the inverse of its period, and the available
tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance
of T1, T2 and T3 requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all
tasks initially arrive at the beginning of the 1st millisecond and task preemptions are allowed, the
first instance of T3 completes its execution at the end of _____________ milliseconds.
operating systems
GATE 2015 SET 1
Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per
minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a
file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a
seek, and the average rotational latency for accessing each sector is half of the time for one
complete rotation. The total time (in milliseconds) needed to read the entire file is ____________.
operating systems
GATE 2015 SET 1
Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given:
45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 50.
The additional distance that will be traversed by the R/W head when the Shortest Seek Time First
(SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN
algorithm moves towards 100 when it starts execution) is____________ tracks.
operating systems
GATE 2015 SET 1
Consider a main memory with five page frames and the following sequence of page references: 3,
8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page
replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?
Both incur the same number of page faults
FIFO incurs 2 more page faults than LRU
LRU incurs 2 more page faults than FIFO
FIFO incurs 1 more page faults than LRU
operating systems
GATE 2015 SET 1
A system has 6 identical resources and N processes competing for them. Each process can request
atmost 2 resources. Which one of the following values of N could lead to a deadlock?
operating systems
GATE 2015 SET 2
Consider six memory partitions of sizes 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and 250 KB,
where KB refers to kilobyte. These partitions need to be allotted to four processes of sizes 357 KB,
210 KB, 468 KB and 491 KB in that order. If the best fit algorithm is used, which partitions are
NOT allotted to any process?
operating systems
GATE 2015 SET 2
operating systems
GATE 2015 SET 2
A computer system implements 8 kilobyte pages and a 32-bit physical address space. Each page
table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the
maximum size of the page table of a process is 24 megabytes, the length of the virtual address
supported by the system is _______________ bits.
operating systems
GATE 2015 SET 2
The maximum number of processes that can be in Ready state for a computer system with n CPUs
is
operating systems
GATE 2015 SET3
The proposed solution prevents deadlock but fails to guarantee mutual exclusion
The proposed solution guarantees mutual exclusion but fails to prevent deadlock
The proposed solution guarantees mutual exclusion and prevents deadlock
The proposed solution fails to prevent deadlock and fails to guarantee mutual exclusion
operating systems
GATE 2015 SET3
Consider the following policies for preventing deadlock in a system with mutually exclusive
resources.
I. Processes should acquire all their resources at the beginning of execution. If any resource is
not available, all resources acquired so far are released
II. The resources are numbered uniquely, and processes are allowed to request for resources
only in increasing resource numbers
III. The resources are numbered uniquely, and processes are allowed to request for resources
only in decreasing resource numbers
IV. The resources are numbered uniquely. A process is allowed to request only for a resource
with resource number larger than its currently held resources
Which of the above policies can be used for preventing deadlock?
Any one of I and III but not II or IV
Any one of I, III, and IV but not II
Any one of II and III but not I or IV
Any one of I, II, III, and IV
operating systems
GATE 2015 SET3
Non-preemptive Shortest Job First
Round Robin with Quantum value two
operating systems
GATE 2015 SET3
Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________ number of requests.
operating systems
GATE 2014 SET 1
Which one of the following is FALSE?
User level threads are not scheduled by the kernel.
When a user level thread is blocked, all other threads of its process are blocked.
Context switching between user level threads is faster than context switching between kernel level threads.
Kernel level threads cannot share the code segment
operating systems
GATE 2014 SET 1
An operating system uses the Banker’s algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below presents the current system state. Here, the Allocation matrix shows the current number of resources of each type allocated to each process and the Max matrix shows the maximum number of resources of each type required by each process during its execution.
There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is currently in a safe state. Consider the following independent requests for additional resources in the current state:
REQ1: P0 requests 0 units of X,
0 units of Y and 2 units of Z
REQ2: P1 requests 2 units of X,
0 units of Y and 0 units of Z
Which one of the following is TRUE?
Only REQ1 can be permitted.
Only REQ2 can be permitted.
Both REQ1 and REQ2 can be permitted
Neither REQ1 nor REQ2 can be permitted
operating systems
GATE 2014 SET 1
Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.
Process Name Arrival Time Execution Time
A 0 6
B 3 2
c 5 4
D 7 6
E 10 3
Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________.
operating systems
GATE 2014 SET 1
Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal replacement policy is__________.
operating systems
GATE 2014 SET 1
A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 4 bytes in size. Given a 100 x 106 bytes disk on which the file system is stored and data block size is 103 bytes, the maximum size of a file that can be stored on this disk in units of 106 bytes is ____________.
operating systems
GATE 2014 SET 2