Operating Systems questions

Q14

GATE CS 2015 CS-3SchedulingMCQ1 mark−1/3 if wrong
The maximum number of processes that can be in Ready state for a computer system with nn CPUs is
Show answer without attempting

Answer: D

Q31

GATE CS 2015 CS-3Concurrency and SynchronizationMCQ1 mark−1/3 if wrong
Two processes XX and YY need to access a critical section. Consider the following synchronization construct used by both the processes

Process X:
/* other code for process X */
while (true)
{
    varP = true;
    while (varQ == true)
    {
        /* Critical Section */
        varP = false;
    }
}
/* other code for process X */
Process Y:
/* other code for process Y */
while (true)
{
    varQ = true;
    while (varP == true)
    {
        /* Critical Section */
        varQ = false;
    }
}
/* other code for process Y */
Here, varP and varQ are shared variables and both are initialized to false. Which one of the following statements is true?
Show answer without attempting

Answer: A

Q45

GATE CS 2015 CS-3DeadlocksMCQ2 marks−2/3 if wrong
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?
Show answer without attempting

Answer: D

Q57

GATE CS 2015 CS-3SchedulingMCQ2 marks−2/3 if wrong
For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?
ProcessArrival TimeProcessing Time
A03
B16
C44
D62
Show answer without attempting

Answer: C

Q29

GATE CS 2015 CS-1Memory ManagementNAT1 mark
Consider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the page table in the system in megabytes is ________.
Show answer without attempting

Answer: 4

Q30

GATE CS 2015 CS-1Concurrency and SynchronizationNAT1 mark
The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.
P1() {
    C = B - 1;
    B = 2 * C;
}

P2() {
    D = 2 * B;
    B = D - 1;
}
The number of distinct values that B can possibly take after the execution is ________.
Show answer without attempting

Answer: 3

Q52

GATE CS 2015 CS-1SchedulingNAT2 marks
Consider a uniprocessor system executing three tasks T1T_1, T2T_2 and T3T_3, 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 T1T_1, T2T_2 and T3T_3 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 T3T_3 completes its execution at the end of ________ milliseconds.
Show answer without attempting

Answer: 12

Q54

GATE CS 2015 CS-1File SystemsNAT2 marks
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 ________.
Show answer without attempting

Answer: 14020

Q56

GATE CS 2015 CS-1SchedulingNAT2 marks
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.
Show answer without attempting

Answer: 10

Q57

GATE CS 2015 CS-1Memory ManagementMCQ2 marks−2/3 if wrong
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)?
Show answer without attempting

Answer: A

Q19

GATE CS 2015 CS-2Memory ManagementNAT1 mark
A computer system implements a 40-bit virtual address, page size of 8 kilobytes, and a 128-entry translation look-aside buffer (TLB) organized into 32 sets each having four ways. Assume that the TLB tag does not store any process id. The minimum length of the TLB tag in bits is __________.
Show answer without attempting

Answer: 22

Q30

GATE CS 2015 CS-2DeadlocksMCQ1 mark−1/3 if wrong
A system has 6 identical resources and NN processes competing for them. Each process can request atmost 2 resources. Which one of the following values of NN could lead to a deadlock?
Show answer without attempting

Answer: D

Q41

GATE CS 2015 CS-2Memory ManagementMCQ2 marks−2/3 if wrong
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?
Show answer without attempting

Answer: A

Q42

GATE CS 2015 CS-2File SystemsNAT2 marks
Consider a typical disk that rotates at 15000 rotations per minute (RPM) and has a transfer rate of 50×10650 \times 10^6 bytes/sec. If the average seek time of the disk is twice the average rotational delay and the controller's transfer time is 10 times the disk transfer time, the average time (in milliseconds) to read or write a 512-byte sector of the disk is _____________.
Show answer without attempting

Answer: 6.1 to 6.2

Q43

GATE CS 2015 CS-2Memory ManagementNAT2 marks
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.
Show answer without attempting

Answer: 36

0/150 correct0 marks

Related topics in GATE CS