Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations

UGC NET Computer Science Previous Year Questions (PYQs)

UGC NET Computer Science Operating System PYQ


UGC NET Computer Science PYQ
Given below are two statements: one is labeled as Assertion A and the other is labeled as Reason R.

Assertion A: Cohesion is a qualitative indication of the degree to which a module can be written more compactly and is able to complete its function in a timely manner.

Reason R: Cohesion is a qualitative indication of the degree to which a module is connected to other modules and the outside world.

In the light of the above statements, choose the most appropriate answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Cohesion means how strongly the elements inside a module are related to each other.

A highly cohesive module performs one clear and well-defined task.

So, Assertion A is taken as correct because it talks about a module completing its function properly.

Reason R says that cohesion is the degree to which a module is connected to other modules and the outside world.

But this is the definition of coupling, not cohesion.

So, Reason R is false.

Therefore,

Assertion A is correct, but Reason R is not correct.

UGC NET Computer Science PYQ
Regarding the subroutines, see the following sequence of tasks to be performed:

A. Turn on the interrupt facility.
B. Service the device whose flag is set.
C. Save the contents of processor registers.
D. Check which flag is set.
E. Restore the contents of processor registers.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Interrupt Service Routine (ISR) steps:


Save processor registers → C


Check which device raised interrupt → D


Service the device → B


Restore processor registers → E


Re-enable interrupt facility → A


Correct sequence:


C, D, B, E, A


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

 LIST II

 A. Critical region

 I. Hoare's monitor

 B. Wait signal

 II. Mutual exclusion

 C. Working set

 III. Principle of locality

 D. Deadlock

 IV. Circular wait

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Critical region is related to mutual exclusion.

Wait signal is related to Hoare's monitor.

Working set is based on principle of locality.

Deadlock is related to circular wait.

So,

A – II, B – I, C – III, D – IV


UGC NET Computer Science PYQ
The sequence of steps for a page replacement algorithm will be:

A. find a frame that is not currently being used
B. change the page table
C. use freed frame
D. no frame is free
E. free a frame





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Steps in page replacement:


No frame is free → D


Find a frame to replace → A


Free that frame → E


Update the page table → B


Use the freed frame for the new page → C


UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

A virtual memory system uses first-in first-out page replacement policy and allocates a fixed number of frames to a process.

Assertion A: Increasing number of page frames allocated to a process sometimes increases the page fault rate.

Reason R: Some programs do not exhibit locality of reference.

In the light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because FIFO page replacement may show Belady’s anomaly.


In Belady’s anomaly, increasing the number of page frames can sometimes increase the number of page faults.


Reason R is true, but it is not the correct explanation of Assertion A.


UGC NET Computer Science PYQ
At a particular time of computation, the value of a counting semaphore is 7. Then 20 P operations and x V operations were completed on this semaphore. If the final value of semaphore is 5, x will be





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Initial semaphore value = 7


Each P operation decreases the value by 1.


Each V operation increases the value by 1.


So,


$7 - 20 + x = 5$


$x - 13 = 5$


$x = 18$


UGC NET Computer Science PYQ
Consider the following statements:

S1: LRU page replacement algorithm suffers from the Belady's anomaly

S2: Shortest remaining time first scheduling may cause starvations

S3: Stack is shared by all threads in a process





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

S1 is false because LRU does not suffer from Belady’s anomaly.


S2 is true because shortest remaining time first may cause starvation for long processes.


S3 is false because each thread has its own stack.


Final Answer: (b) S1, S3 false and S2 is true


UGC NET Computer Science PYQ
Consider the following interrupt protection levels in Linux, and arrange them in the increasing order of their priorities:
  • A. User-Mode Programs (Preemptible)
  • B. Bottom Half Interrupt Handlers
  • C. Top Half Interrupt Handlers
  • D. Kernel System Service Routines (Preemptible)
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

  • User-Mode Programs have the lowest priority and are preemptible.
  • Kernel System Service Routines run in kernel mode and can be preempted by higher priority tasks like interrupts.
  • Bottom Half Interrupt Handlers execute after the top half and have higher priority than kernel threads.
  • Top Half Interrupt Handlers handle immediate hardware responses and have the highest priority.

UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I
 List-II
 A. Thread spawn
 I. to convert a blocking system call into a nonblocking call
 B. Block thread
 II. to reclaim pages
 C. Jacketing
 III. processor turn to the execution of another ready thread
 D. Flush

 IV. thread is provided with its own register context






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Thread spawn → thread gets its own register context → IV

Block thread → CPU switches to another ready thread → III

Jacketing → convert blocking system call to nonblocking → I

Flush → reclaim pages → II


Matching:


A → IV

B → III

C → I

D → II


UGC NET Computer Science PYQ
Match List-I with List-II:
 List-I
 List-II
 A. Batch Multiprogramming
I. allows more efficient use of main memory
 
 B. Time sharing
II. user no longer has direct access to the processor
 
 C. Monitor
 III. Maximize processor use
 D. Reentrant Procedures

 IV. minimize response time






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Batch Multiprogramming → maximize CPU utilization → III

Time sharing → minimize response time → IV

Monitor → user does not directly control processor → II

Reentrant procedures → efficient use of memory → I


Matching:


A → III

B → IV

C → II

D → I


UGC NET Computer Science PYQ
If an operating system does not allow a child process to exist when the parent process has been terminated, this phenomenon is called as -





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

When a parent process is terminated, the operating system may terminate all its child processes.

This is called cascading termination.

UGC NET Computer Science PYQ
In a multi user operating system, 20 requests are made to use a particular resource per hour, on an average. The probability that no request is made in 45 minutes is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Average requests per hour = $20$

Time = $45$ minutes $= \frac{3}{4}$ hour

Mean number of requests in $45$ minutes:

$\lambda = 20 \times \frac{3}{4} = 15$

Using Poisson distribution:

$P(X=0)=e^{-\lambda}\frac{\lambda^0}{0!}$

$P(X=0)=e^{-15}$

UGC NET Computer Science PYQ
Which of the following is not correct about the virtual memory segmentation?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Properties of segmentation:


• Segments can be loaded independently → True

• No internal fragmentation → True

• Large virtual address space → True


Segmentation does not reduce multiprogramming; it usually supports better memory utilization.


Thus incorrect statement:


UGC NET Computer Science PYQ
Assuming that the system call $fork()$ never fails, consider the following C programs $P1$ and $P2$ executed on a UNIX or Linux system:
Program $P1$ Program $P2$
/* P1 */int main() {    fork();    fork();    fork();    print("Happy\n");}
/* P2 */int main() {    fork();    print("Happy\n");    fork();    print("Happy\n");    fork();    print("Happy\n");}
Statement I: $P1$ displays "Happy" $8$ times.Statement II: $P2$ displays "Happy" $12$ times.In the light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For program $P1$:

There are $3$ fork calls before the print statement.

Each $fork()$ doubles the number of processes.

So, total number of processes after $3$ fork calls is:

$2^3=8$

Each process executes the print statement.

Therefore, $P1$ displays "Happy" $8$ times.

So, Statement I is true.

For program $P2$:

Initially, there is $1$ process.

After first $fork()$:

Number of processes $=2$

So, first print statement executes $2$ times.

After second $fork()$:

Number of processes $=4$

So, second print statement executes $4$ times.

After third $fork()$:

Number of processes $=8$

So, third print statement executes $8$ times.

Total number of times "Happy" is printed:

$2+4+8=14$

So, $P2$ displays "Happy" $14$ times, not $12$ times.

Therefore, Statement II is false.

UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0.....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is least recently used. If T is stored in the virtual address space in row major format.

What is the main memory hit ratio?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In row major format, each row has 1024 elements.

Page size = 1024 words

So, each row occupies exactly 1 page.

There are 17 rows, so there are 17 pages.

For each column, access pattern is:

$T[0][j], T[1][j], T[2][j], ..., T[16][j]$

This means 17 different pages are accessed repeatedly.

But main memory can hold only 16 pages.

Using LRU, every access causes a page fault.

So, hit ratio = 0

UGC NET Computer Science PYQ
Consider again that T is stored in column major format, what is the main memory hit ratio?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In column major format, elements of each column are stored continuously.

Each column has 17 elements.

Total elements:

$17 \times 1024 = 17408$

Page size = 1024 words

Total pages:

$\frac{17408}{1024}=17$

Since access is column-wise, memory access is almost sequential.

Only 1 page fault occurs per page.

Total page faults = 17

Total memory references = 17408

Hits:

$17408 - 17 = 17391$

Hit ratio:

$\frac{17391}{17408} \times 100 \approx 99.9%$

UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0.....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is least recently used.

Consider that T is stored in column major format, how many page faults will be encountered?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Total elements in table T:

$17 \times 1024 = 17408$

Page size:

$1024$ words

Number of pages required:

$\frac{17408}{1024}=17$

In column major format, the program accesses elements column by column, so memory access is sequential.

Each page will cause one page fault.

Therefore,

Total page faults = $17$

UGC NET Computer Science PYQ

Consider a disk system with $100$ cylinders. The requests to access the cylinders occur in the following sequence:

$4,34,10,7,19,73,2,15,6,20$

Assuming that the head is currently at cylinder $50$, what is the time taken to satisfy all requests if it takes $1$ ms to move from one cylinder to adjacent one and the shortest seek time first policy is used?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Using shortest seek time first policy, the head always moves to the nearest request.

Initial head position is

$50$

Request sequence in SSTF order will be:

$50 \to 34 \to 20 \to 19 \to 15 \to 10 \to 7 \to 6 \to 4 \to 2 \to 73$

Now, total head movement is

$|50-34|+|34-20|+|20-19|+|19-15|+|15-10|+|10-7|+|7-6|+|6-4|+|4-2|+|2-73|$

$=16+14+1+4+5+3+1+2+2+71$

$=119$

Since $1$ cylinder movement takes $1$ ms,

Total time taken is

$119$ ms


UGC NET Computer Science PYQ
Which of the following is not a characteristic of a specialized embedded OS?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Embedded OS features:


• real-time scheduling

• interrupt handling

• memory partitioning


File system features like non-sequential files are typical for general purpose OS.


UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used", if T is stored in the virtual address space in row major format.

How many page faults will be encountered?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

T has 17 rows and 1024 columns.

Page size = 1024 words

Since memory is word addressable and each element is 1 word, each row contains:

$1024$ words

So, in row major format, each row occupies exactly one page.

Total pages for T:

$17$ pages

Main memory can hold only 16 pages.

The program accesses elements column-wise:

$T[0][j], T[1][j], T[2][j], \ldots, T[16][j]$

So, for each column, it accesses 17 different pages.

Since memory can hold only 16 pages and LRU is used, every access causes a page fault.

Total memory accesses:

$17 \times 1024 = 17408$

Therefore, total page faults:

$17408$

UGC NET Computer Science PYQ
Match List-I with List-II:
List-I List-II
(a) Disk (i) Thread
(b) CPU (ii) Signal
(c) Memory (iii) File system
(d) Interrupt (iv) Virtual address space
Choose the correct option from those given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Disk is related to file system because files are stored and managed on disk.

So,

$(a) \rightarrow (iii)$

CPU is related to thread because a thread is the basic unit of CPU scheduling.

So,

$(b) \rightarrow (i)$

Memory is related to virtual address space.

So,

$(c) \rightarrow (iv)$

Interrupt is related to signal because signals are software-level notifications similar to interrupts.

So,

$(d) \rightarrow (ii)$

Therefore, correct matching is

$(a)-(iii);\ (b)-(i);\ (c)-(iv);\ (d)-(ii)$


UGC NET Computer Science PYQ
The order of steps of Address Translation in Linux Virtual Memory Scheme will be:

A. register
B. offset
C. Page directory
D. Page table
E. Page middle directory

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Linux 4-level paging:


register → page directory → page middle directory → page table → offset


Order:


$A \rightarrow C \rightarrow E \rightarrow D \rightarrow B$


UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0.....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used", if T is stored in the virtual address space in row major format.

What is fault ratio of row major to column major arrangements?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

For row major arrangement:

Each row has 1024 elements.

Page size = 1024 words

So, each row occupies 1 page.

Total rows = 17, so total pages = 17.

Main memory can hold only 16 pages.

The program accesses column-wise:

$T[0][j], T[1][j], T[2][j], ..., T[16][j]$

So, every access causes a page fault.

Row major page faults:

$17 \times 1024 = 17408$

For column major arrangement:

Elements of each column are stored continuously.

Total elements:

$17 \times 1024 = 17408$

Page size = 1024 words

Column major page faults:

$\frac{17408}{1024} = 17$

Fault ratio:

$17408 : 17 = 1024 : 1$

UGC NET Computer Science PYQ

Which of the following are NOT shared by the threads of the same process?

$(a)$ Stack
$(b)$ Registers
$(c)$ Address space
$(d)$ Message queue






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Threads of the same process share resources like address space, code section, data section and other process resources.

But each thread has its own stack.

Also, each thread has its own register set because the CPU state of each thread must be stored separately.

So, stack and registers are not shared by threads of the same process.


UGC NET Computer Science PYQ
Consider that a process has been allocated $3$ frames and has a sequence of page referencing as $1,2,1,3,7,4,5,6,3,1$. What shall be the difference in page faults for the above string using the algorithms of LRU and optimal page replacement for referencing the string?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given reference string is

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

Number of frames is

$3$

Using LRU page replacement, total page faults are

$9$

Using optimal page replacement, total page faults are

$7$

Therefore, required difference is

$9-7=2$


UGC NET Computer Science PYQ
Consider three CPU intensive processes, which require $10,20$ and $30$ units of time and arrive at times $0,2$ and $6$ respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Let the processes be $P_1,P_2,P_3$.

$P_1$: arrival time $0$, burst time $10$
$P_2$: arrival time $2$, burst time $20$
$P_3$: arrival time $6$, burst time $30$

At time $0$, $P_1$ starts executing.

At time $2$, $P_2$ arrives, but remaining time of $P_1$ is $8$, which is less than $20$. So, $P_1$ continues.

At time $6$, $P_3$ arrives, but remaining time of $P_1$ is $4$, which is less than $30$. So, $P_1$ continues.

$P_1$ completes at time $10$.

Then context switch occurs from $P_1$ to $P_2$.

$P_2$ completes at time $30$.

Then context switch occurs from $P_2$ to $P_3$.

So, total context switches are

$2$


UGC NET Computer Science PYQ
At a particular time of computation, the value of a counting semaphore is $7$. Then $20$ $P$ wait operations and $15$ $V$ signal operations are completed on this semaphore. What is the resulting value of the semaphore?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Initial value of semaphore is

$7$

Each $P$ wait operation decreases the semaphore value by $1$.

So, after $20$ $P$ operations:

$7-20=-13$

Each $V$ signal operation increases the semaphore value by $1$.

So, after $15$ $V$ operations:

$-13+15=2$

Therefore, resulting value of semaphore is

$2$


UGC NET Computer Science PYQ
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

The minimum number of page frames required depends on the maximum number of pages that may be referenced by a single instruction.

This depends on the instruction format and addressing modes.

Therefore, it is determined by the instruction set architecture.


UGC NET Computer Science PYQ
A computer has six tape drives with $n$ processes competing for them. Each process may need two drives. What is the maximum value of $n$ for the system to be deadlock free?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Total tape drives are

$6$

Each process may need maximum $2$ tape drives.

For deadlock free condition:

$R \ge n(m-1)+1$

Here,

$R=6$ and $m=2$

So,

$6 \ge n(2-1)+1$

$6 \ge n+1$

$n \le 5$

Therefore, maximum value of $n$ is

$5$


UGC NET Computer Science PYQ

Model of protection can be viewed as






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In operating system, protection model is commonly represented by an access matrix.

Rows represent domains.

Columns represent objects.

Entries represent access rights.

UGC NET Computer Science PYQ

Process in memory also contain the heap section. What is the use of heap section?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Heap section is used for dynamic memory allocation during program execution.

For example, memory allocated using malloc, calloc, new, etc. is stored in heap.

UGC NET Computer Science PYQ

How many page faults occur for optimal algorithm for the following reference string, with four frames?


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






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Using optimal page replacement algorithm with $4$ frames:

First four pages cause faults:

$1,2,3,4 \Rightarrow 4$ page faults

Next page $5$ causes fault. Replace page $2$ because it is not used again.

Page faults $=5$

Pages $3,4,1$ are already present, so no fault.

Next pages $6,7,8$ cause faults.

Total page faults:

$5+3=8$

UGC NET Computer Science PYQ
For the following page reference string $4,3,2,1,4,3,5,4,3,2,1,5$, the number of page faults that occur in the least Recently Used $(LRU)$ page replacement algorithm with frame size $3$ is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given page reference string is:

$4,3,2,1,4,3,5,4,3,2,1,5$

Frame size $=3$

Using LRU page replacement, the least recently used page is replaced when a page fault occurs.

Now process each page:

$4$ gives page fault.

Frames: $4$

Total faults $=1$

$3$ gives page fault.

Frames: $4,3$

Total faults $=2$

$2$ gives page fault.

Frames: $4,3,2$

Total faults $=3$

$1$ gives page fault. Replace least recently used page $4$.

Frames: $1,3,2$

Total faults $=4$

$4$ gives page fault. Replace least recently used page $3$.

Frames: $1,4,2$

Total faults $=5$

$3$ gives page fault. Replace least recently used page $2$.

Frames: $1,4,3$

Total faults $=6$

$5$ gives page fault. Replace least recently used page $1$.

Frames: $5,4,3$

Total faults $=7$

$4$ is already present.

Frames: $5,4,3$

Total faults $=7$

$3$ is already present.

Frames: $5,4,3$

Total faults $=7$

$2$ gives page fault. Replace least recently used page $5$.

Frames: $2,4,3$

Total faults $=8$

$1$ gives page fault. Replace least recently used page $4$.

Frames: $2,1,3$

Total faults $=9$

$5$ gives page fault. Replace least recently used page $3$.

Frames: $2,1,5$

Total faults $=10$

Therefore, number of page faults $=10$.

UGC NET Computer Science PYQ

Degree of concurrency in thread can be arranged in the manner.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In one-to-one model, each user thread maps to one kernel thread, so concurrency is high.

In many-to-many model, many user threads map to many kernel threads, so concurrency is moderate.

In many-to-one model, many user threads map to only one kernel thread, so concurrency is lowest.

Therefore,

UGC NET Computer Science PYQ

Degree of concurrency in thread can be arranged in the manner.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In one-to-one model, each user thread maps to one kernel thread, so concurrency is high.

In many-to-many model, many user threads map to many kernel threads, so concurrency is moderate.

In many-to-one model, many user threads map to only one kernel thread, so concurrency is lowest.

Therefore,

UGC NET Computer Science PYQ
A counting semaphore is initialized to $8$. $3$ wait $()$ operations and $4$ signal $()$ operations are applied. Find the current value of the semaphore variable.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Initial value of semaphore:

$S=8$

Each wait $()$ operation decreases semaphore value by $1$.

After $3$ wait $()$ operations:

$S=8-3=5$

Each signal $()$ operation increases semaphore value by $1$.

After $4$ signal $()$ operations:

$S=5+4=9$


UGC NET Computer Science PYQ
Which of the following CPU scheduling algorithms is/are supported by LINUX operating system?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Linux operating system supports preemptive priority scheduling.

Linux also supports time-sharing CPU scheduling for normal user processes.

So, both preemptive priority scheduling and time-sharing CPU scheduling are supported by Linux.


UGC NET Computer Science PYQ

Consider a paging system where translation lookaside buffer $($TLB$)$, a special type of associative memory, is used with a hit ratio of $80%$.

Assume that memory reference takes $80$ nanoseconds and reference time to TLB is $20$ nanoseconds. What will be the effective memory access time given an $80%$ hit ratio?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

TLB access time $=20$ ns

Memory access time $=80$ ns

Hit ratio $=80%=0.8$

Miss ratio $=20%=0.2$

For TLB hit:

Effective time $=20+80=100$ ns

For TLB miss:

First TLB is checked, then page table is accessed from memory, then actual memory is accessed.

Effective time $=20+80+80=180$ ns

Now,

Effective memory access time:

$EAT=0.8(100)+0.2(180)$

$EAT=80+36$

$EAT=116$ ns


UGC NET Computer Science PYQ
Suppose a system has $12$ magnetic tape drives and at the time $t_0$, three processes are allotted tape drives out of their need as given below:
Process Maximum Needs Current Needs
$p_0$ $10$ $5$
$p_1$ $4$ $2$
$p_2$ $9$ $2$
At time $t_0$, the system is in a safe state. Which of the following is a safe sequence so that deadlock is avoided?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Total tape drives $=12$

Current allocated tape drives:

$5+2+2=9$

Available tape drives:

$12-9=3$

Now calculate remaining need:

For $p_0$:

$10-5=5$

For $p_1$:

$4-2=2$

For $p_2$:

$9-2=7$

Initially available tape drives are $3$.

Since $p_1$ needs only $2$ tape drives, so $p_1$ can execute first.

After completion of $p_1$, it releases $2$ tape drives.

Available tape drives become:

$3+2=5$

Now $p_0$ needs $5$ tape drives, so $p_0$ can execute.

After completion of $p_0$, it releases $5$ tape drives.

Available tape drives become:

$5+5=10$

Now $p_2$ needs $7$ tape drives, so $p_2$ can execute.

Hence, the safe sequence is:

<$p_1$ , $p_0$ , $p_2$>

Therefore, the correct answer is option (B).

UGC NET Computer Science PYQ
Which of the following interprocess communication model is used to exchange messages among co-operative processes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Co-operating processes can communicate with each other using two main IPC models:

Shared memory model

Message passing model

In shared memory, processes communicate by sharing a common memory area.

In message passing, processes communicate by sending and receiving messages.

So, interprocess communication can be done using both shared memory and message passing model.


UGC NET Computer Science PYQ
Given a CPU time slice of $2$ ms and the following list of processes.
Process Burst time $($ms$)$ Arrival time
$P1$ $3$ $0$
$P2$ $4$ $2$
$P3$ $5$ $5$
Find average turnaround time and average waiting time using round-robin CPU scheduling.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Time quantum $=2$ ms

Gantt chart:

$P1(0-2),\ P2(2-4),\ P1(4-5),\ P2(5-7),\ P3(7-9),\ P3(9-11),\ P3(11-12)$

Completion time:

$CT(P1)=5$

$CT(P2)=7$

$CT(P3)=12$

Turnaround time:

$TAT=CT-AT$

For $P1$:

$TAT=5-0=5$

For $P2$:

$TAT=7-2=5$

For $P3$:

$TAT=12-5=7$

Average turnaround time:

$\dfrac{5+5+7}{3}=\dfrac{17}{3}=5.66$

Waiting time:

$WT=TAT-BT$

For $P1$:

$WT=5-3=2$

For $P2$:

$WT=5-4=1$

For $P3$:

$WT=7-5=2$

Average waiting time:

$\dfrac{2+1+2}{3}=\dfrac{5}{3}=1.66$


UGC NET Computer Science PYQ
Which of the following methods are used to pass any number of parameters to the operating system through system calls?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Parameters can be passed to the operating system through system calls using different methods.

Registers can be used, but registers are limited in number.

For passing any number of parameters, better methods are:

Block or table in main memory

Stack

So, any number of parameters can be passed using block in main memory and stack.


UGC NET Computer Science PYQ
Match List I with List II:
List I List II
(A) Least frequently used (I) Memory is distributed among processors
(B) Critical Section (II) Page replacement policy in cache memory
(C) Loosely coupled multiprocessor system (III) Program section that once begun must complete execution before another processor accesses the same shared resource
(D) Distributed operating system (IV) O/S routines are distributed among available processors
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each term with its correct meaning.

First, consider Least frequently used.

Least frequently used is a replacement policy.

It replaces the page or cache block which is used least number of times.

So,

$(A)-(II)$

Now, consider Critical Section.

Critical section is a part of a program where shared resources are accessed.

Once one process enters the critical section, another process should not access the same shared resource at the same time.

So,

$(B)-(III)$

Now, consider Loosely coupled multiprocessor system.

In a loosely coupled multiprocessor system, each processor generally has its own local memory.

So, memory is distributed among processors.

Therefore,

$(C)-(I)$

Now, consider Distributed operating system.

In a distributed operating system, operating system routines and services are distributed among available processors.

So,

$(D)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$

UGC NET Computer Science PYQ
Match List I with List II:
List IList II
(A) Firmware(I) Number of logical records into physical blocks
(B) Batch file(II) ASCII format
(C) Packing(III) Resource allocation
(D) Banker’s Algorithm(IV) ROM
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each term with its correct meaning.

Firmware is a low-level program stored permanently in ROM.

So,

$(A)-(IV)$

A batch file contains a sequence of commands.

Batch files are usually stored as text files in ASCII format.

So,

$(B)-(II)$

Packing means placing a number of logical records into physical blocks.

So,

$(C)-(I)$

Banker’s Algorithm is used for safe resource allocation and deadlock avoidance.

So,

$(D)-(III)$

Final matching is:

$(A)-(IV), (B)-(II), (C)-(I), (D)-(III)$

UGC NET Computer Science PYQ
Consider the following:
List IList II
(A) Stack algorithm(I) Deadlock
(B) Elevator algorithm(II) Disk scheduling
(C) Priority scheduling algorithm(III) Page replacement
(D) Havender's algorithm(IV) CPU scheduling
Which of the following is the correct matching?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Stack algorithm is related to page replacement.

In page replacement, stack algorithms have the property that the set of pages in memory with fewer frames is always a subset of the set with more frames.

So,

$(A)-(III)$

Elevator algorithm is used in disk scheduling.

It is also known as the SCAN disk scheduling algorithm.

So,

$(B)-(II)$

Priority scheduling algorithm is a CPU scheduling algorithm.

In this algorithm, the process with higher priority is scheduled first.

So,

$(C)-(IV)$

Havender's algorithm is related to deadlock prevention.

It prevents deadlock by denying one of the necessary conditions for deadlock.

So,

$(D)-(I)$

Final matching is:

$(A)-(III), (B)-(II), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ

Which of the following statements are TRUE about mutual exclusion in concurrent programming ?

(A) Mutual exclusion ensures that only one process can be in a critical section at any given time.
(B) Mutual exclusion are designed to prevent conflicts and ensure that only one process can access shared resources at a time.
(C) Mutual exclusion can use various algorithms to ensure that processes do not enter the critical section simultaneously.
(D) Mutual exclusion allows multiple processes to access the critical section simultaneously to improve performance.

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True

Mutual exclusion ensures only one process enters critical section at a time.


(B) True

It prevents conflicts on shared resources.


(C) True

Algorithms like Peterson, Dekker, semaphore, mutex ensure mutual exclusion.


(D) False

Critical section cannot be accessed simultaneously by multiple processes.


Thus correct statements:


(A), (B), (C)


UGC NET Computer Science PYQ

Which of the following statements are true?

A. If the time quantum is extremely small, round robin can result in a large number of context switches.

B. The average turnaround time of a set of processes does not necessarily improve as the time-quantum size increases.

C. The average turnaround time can be improved if most processes finish their next CPU burst in a single time quantum.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is true because very small time quantum causes frequent context switching.

Statement B is true because increasing time quantum does not always improve average turnaround time.

Statement C is true because if most processes finish in one time quantum, turnaround time can improve.

So, all A, B and C are true.

UGC NET Computer Science PYQ

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
 A0 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 (in milliseconds) is ____







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Using SRTF scheduling:

$A: 0 \to 3$

$B: 3 \to 5$

$A: 5 \to 8$

$C: 8 \to 12$

$E: 12 \to 15$

$D: 15 \to 21$

Completion times:

$A=8,\ B=5,\ C=12,\ D=21,\ E=15$

Turnaround time $=$ Completion time $-$ Arrival time

$A=8-0=8$

$B=5-3=2$

$C=12-5=7$

$D=21-7=14$

$E=15-10=5$

Average turnaround time:

$=\frac{8+2+7+14+5}{5}$

$=\frac{36}{5}$

$=7.2$

Correct option is:

$\boxed{(a)\ 7.2}$


UGC NET Computer Science PYQ

Select the correct order of basic page replacement.

A. Page replacement algorithm is used in case there is no free frame

B. The process is continued by restarting the instruction caused by TRAP

C. Location of desired frame is found from disk

D. Desired page is brought into newly freed frame and page and frame tables are updated






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Basic page replacement order is:

First, location of desired page is found from disk.

Then, if no free frame is available, page replacement algorithm is applied.

Then, desired page is brought into newly freed frame and page table and frame table are updated.

Finally, the process is restarted from the instruction that caused the trap.

So, correct order is:

$C,A,D,B$

Correct option is:

$\boxed{(c)\ C,A,D,B}$


UGC NET Computer Science PYQ

Match List - I with List - II.

 List - I (operating system concepts)

List - II (characteristics) 

 (A) Paging
 (I) Evicts least recently used process
 (B) LRU (Least Recently Used)
 (II) Extends physical memory
 (C) C-SCAN
 (III) Logical to physical mapping
 (D) Virtual Memory

 (IV) Circular disk access

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Paging → Logical to physical address mapping → (III)


LRU → Replace least recently used page → (I)


C-SCAN → Circular disk scheduling → (IV)


Virtual Memory → Extends physical memory → (II)


Thus:


(A)-(III), (B)-(I), (C)-(IV), (D)-(II)


UGC NET Computer Science PYQ

Which of the following statements are TRUE about Process Control Block (PCB) ?

(A) The PCB contains information about the process state, such as whether it is running, waiting or terminated

(B) The PCB includes the program code and data segments of the process

(C) The PCB stores the process’s memory management information, such as page tables and segment tables

(D) The PCB is used to track process scheduling information and CPU registers for process

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True

PCB stores process state (running, ready, waiting).


(B) False

Program code and data are stored in process memory, not in PCB.


(C) True

PCB stores memory management information (page tables, segment tables).


(D) True

PCB contains CPU registers and scheduling information.


Thus correct statements:


(A), (C), (D)


UGC NET Computer Science PYQ

Match List I with List II

List I List II
A. Clustered Page Table III. Useful for sparse address spaces.
B. Hierarchical Page Table I. Generally considered inappropriate for 64-bit architectures.
C. Segmentation IV. Supports a user view of the system.
D. Inverted Page Table II. Has only entry for each real page (or frame) of memory.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Explanation:

  • $A \rightarrow III$ → Clustered Page Table is useful for sparse address spaces.
  • $B \rightarrow I$ → Hierarchical Page Table is inappropriate for 64-bit architectures.
  • $C \rightarrow IV$ → Segmentation supports user’s logical view.
  • $D \rightarrow II$ → Inverted Page Table has only one entry per real page frame.

UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. reference bit = $0$, modify bit = $0$

I. Must write out before replacement.

B. reference bit = $0$, modify bit = $1$

II. Probably will be used again soon and need to write out.

C. reference bit = $1$, modify bit = $0$

III. Best page to replace.

D. reference bit = $1$, modify bit = $1$

IV. Probably will be used again soon.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

If reference bit $=0$ and modify bit $=0$, page is not recently used and not modified, so it is the best page to replace.

If reference bit $=0$ and modify bit $=1$, page is not recently used but modified, so it must be written out before replacement.

If reference bit $=1$ and modify bit $=0$, page is recently used and clean, so it will probably be used again soon.

If reference bit $=1$ and modify bit $=1$, page is recently used and modified, so it will probably be used again soon and needs to be written out.

So,

A → III
B → I
C → IV
D → II

Correct option is:

$\boxed{(d)\ A-III,\ B-I,\ C-IV,\ D-II}$


UGC NET Computer Science PYQ
Arrange the process of virtualization in cloud environments.

A. Hypervisor installed on physical server
B. Virtual machines created
C. Resources allocated to Virtual machines
D. Virtual machines run isolated workloads





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Step 1 – Install hypervisor on the physical server.
Step 2 – Create virtual machines.
Step 3 – Allocate resources (CPU, RAM, etc.) to each VM.
Step 4 – VMs run isolated workloads.

UGC NET Computer Science PYQ
The write operation in I/O operation does the following -





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

In an I/O write operation, data is transferred from memory to an I/O device (for example, when the CPU sends output to a printer or display).
In contrast, an I/O read operation transfers data from I/O device to memory.

UGC NET Computer Science PYQ

Identify the circumstances under which pre-emptive CPU scheduling is used:

(a) A process switches from Running state to Ready state
(b) A process switches from Waiting state to Ready state
(c) A process completes its execution
(d) A process switches from Ready to Waiting state






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Pre-emptive scheduling is used when the currently running process can be interrupted and CPU can be given to another process.

Statement (a) is correct because when a process moves from Running to Ready state, CPU is taken away from it.

Statement (b) is also correct because when a process moves from Waiting to Ready state, it may have higher priority and may preempt the current process.

Statement (c) is not preemption because the process completes naturally.

Statement (d) is not a valid normal transition for preemption.

So, correct statements are:

(a) and (b)


UGC NET Computer Science PYQ
List I (RAID Levels) List II (Description)
A. RAID Level 2 IV. Also known as Memory style error correcting code organization
B. RAID Level 3 III. Bit interleaved parity
C. RAID Level 5 I. Block interleaved distribution parity
D. RAID Level 6 II. Also known as P+Q redundancy scheme

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

 A→III, B→IV, C→I, D→II

UGC NET Computer Science PYQ

Match List - I with List - II.

 List - I (Algorithms)

List - II (Characteristics) 

 (A) First Come First Served (FCFS)
 (I) Each process is assigned a priority
(B) Shortest Job First (SJF)
 (II) Ensures fair allocation of CPU time by assigning time slice
 (C) Round Robin (RR)
(III) Processes are executed in the order they arrive
 
 (D) Priority Scheduling

 (IV) Select the process for execution with smallest next burst time

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

FCFS → executed in order of arrival → (III) SJF → smallest burst time → (IV) Round Robin → time slice fairness → (II) Priority Scheduling → priority based → (I) Thus: (A)-(III), (B)-(IV), (C)-(II), (D)-(I)

UGC NET Computer Science PYQ
A disk has $300$ cylinders $(0$ to $299)$. If the initial position of the read-write head is at cylinder $101$, moving towards the higher end of the disk, calculate the total head movement following C_LOOK policy for the read request sequence:

$123,45,197,87,250,198,280$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Initial head position:

$101$

Direction is towards higher cylinder numbers.

Request sequence in sorted order:

$45,87,123,197,198,250,280$

Using C_LOOK, first serve higher side requests:

$101 \to 123 \to 197 \to 198 \to 250 \to 280$

Then jump to lowest request:

$280 \to 45$

Then continue:

$45 \to 87$

Total head movement:

$=|123-101|+|197-123|+|198-197|+|250-198|+|280-250|+|45-280|+|87-45|$

$=22+74+1+52+30+235+42$

$=456$

Correct option is:

$\boxed{(a)\ 456}$


UGC NET Computer Science PYQ
Consider the following table about processes, their burst time and arrival time
ProcessBurst TimeArrival Time
P190
P2300
P340
P482
P5116
Now, which process finishes second last in the Gantt chart for: non-preemptive SJF, and Round Robin (time quantum = 10)?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

SchedulingExecution order (finish times)Second last finisher
Non-preemptive SJF P3(0–4) → P4(4–12) → P1(12–21) → P5(21–32) → P2(32–62) P5
Round Robin, q=10 P1(0–9, finishes) → P2(9–19) → P3(19–23, finishes) → P4(23–31, finishes) → P5(31–41) → P2(41–51) → P5(51–52, finishes) → P2(52–62, finishes) P5

UGC NET Computer Science PYQ

Given below are the two statements:

Statement I: The main objective for using virtual memory is to increase the effective capacity of the memory system.

Statement II: The size of virtual memory can be larger than the main memory.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement I is true because virtual memory increases the effective memory capacity.

Statement II is also true because virtual memory can be larger than main memory.


UGC NET Computer Science PYQ
What shall be the average waiting time per process if we know that 10 processes (on average) arrive every second and there are normally 20 processes in the queue?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Using Little’s Law → $N = \lambda \times W$ where

$N = 20$ (average number of processes in the system)

$\lambda = 10$ (arrival rate per second)

So,

$W = N / \lambda = 20 / 10 = 2$ seconds (average waiting + service time).

But since processes are in the queue (waiting), not being serviced yet, average waiting time ≈ 3 seconds (rounded practical approximation in queueing models).


UGC NET Computer Science PYQ

Given below are the two statements:

Statement I: Any retrieval request that is specified in the basic relational algebra can also be specified in relational calculus.

Statement II: Any retrieval request that is specified in the relational calculus can also be specified in basic relational algebra.

In the light of the above statements, choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Relational algebra and relational calculus have the same expressive power.

Any query written in relational algebra can be written in relational calculus.

Any safe query written in relational calculus can also be written in relational algebra.

So, both statements are true.

Correct option is:

$\boxed{(a)\ \text{Both Statement I and Statement II are true}}$


UGC NET Computer Science PYQ
Which of the following statements is correct for Pthreads?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Pthreads (POSIX Threads) are defined by POSIX.1c (IEEE 1003.1c) standard. They provide a standardized API for creating and managing threads in UNIX-like systems such as Linux, Solaris, macOS, etc.

UGC NET Computer Science PYQ

Which of the following statements are TRUE about Privileged Instructions?


(A) It can only be executed by the Operating System kernel and not by user applications.


(B) It is designed to perform operations that can directly affect the hardware or system state such as I/O operations or changing memory management setting.


(C) User applications can execute privileged instructions if they have correct permissions, set by the Operating System.


(D) It is usually executed in user mode to ensure the safety and security of the system.


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True
Privileged instructions run in kernel mode

(B) True
Used for hardware control, I/O, memory management

(C) False
User programs cannot execute privileged instructions

(D) False
Executed in kernel mode, not user mode

UGC NET Computer Science PYQ
What is the total swap time (Swap in & Swap out) in a system for a 15 MB process with a transfer rate of 30 MBps. Given that there is an average latency of 12 ms, however no head seeks involved.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Total swap time = 2 × (Transfer time + Latency) Transfer time for 15 MB = 15 / 30 = 0.5 sec So, Total time = 2 × (0.5 + 0.012) = 1.024 sec

UGC NET Computer Science PYQ
Identify the correct statement(s) from the following with respect to Spinlock Semaphores:
A. The name refers to busy waiting semaphores.
B. They are not useful when the locks are to be held for a short duration of time.
C. It may require multiple context switches when a process waits on a lock.
D. They are often employed on Uniprocessor systems.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Spinlocks are busy waiting locks, meaning the thread repeatedly checks until the lock becomes available — so A is correct.
They are actually useful for short duration locks, since blocking (context switch) is costlier — so B is incorrect.
They do not cause context switches, as the waiting is done actively in CPU — so C is incorrect.
Spinlocks are inefficient on uniprocessor systems, because while one thread spins, the other cannot release the lock — so D is incorrect.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

Which of the following is NOT a requirement for Banker’s algorithm to grant a resource request?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Banker’s Algorithm grants a request only if the following conditions are satisfied:

• The requested resources are available in the system.
• The request does not exceed the maximum claim of the process.
• After allocation, the system remains in a safe state.

However, the algorithm does not require that the process be the only one requesting resources. Multiple processes can request resources simultaneously.

Therefore, the statement that is NOT required is:

The process must be the only one requesting resources.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

What is the primary goal of the Banker’s Algorithm?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

The Banker’s Algorithm is a deadlock avoidance algorithm. Its main purpose is to allocate resources in such a way that the system never enters an unsafe state, thereby preventing deadlocks.

Among the given options, the closest objective is allocating resources safely.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

What information is used to determine if a resource request can be granted?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Banker’s Algorithm decides resource allocation based on:

• Available resources
• Current allocation of resources
• Maximum demand of processes

From the given options, the relevant information is:

Available resources and current allocation of each process.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

What is the significance of the Banker’s algorithm in terms of resource management?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

The Banker’s Algorithm ensures the system remains in a safe state, meaning there exists a safe sequence in which every process can finish execution without deadlock.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

Which data structure does the Banker’s Algorithm use to maintain the state of available, maximum and allocated resources?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Banker’s Algorithm uses the following structures:

• Available vector
• Max matrix
• Allocation matrix
• Need matrix

UGC NET Computer Science PYQ

In Linux Operating System, when __________ is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In Linux, $clone()$ is used to create a new task.

The important feature of $clone()$ is that it takes different flags.

These flags decide what will be shared between parent and child, such as:

Memory space
File system information
Open files
Signal handlers

So, the system call that is passed a set of flags to decide sharing between parent and child tasks is $clone()$.


UGC NET Computer Science PYQ

The main function of the microkernel is to provide a communication facility between the __________ program and the various _____ that are also running in user space.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a microkernel operating system, most services run in user space.

Examples of services are:

File service
Device driver service
Memory management service

The microkernel mainly provides communication between the client program and these services.

This communication is usually done using message passing.

So, the correct words are:

$Client,\ Services$


UGC NET Computer Science PYQ

Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is first come first served $FCFS$. If $FCFS$ is replaced by shortest seek time first $SSTF$ and the vendor claims $50%$ better benchmark results. What is the expected improvement in the I/O performance of user programs?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The system can execute only one sequential user process at a time.

So, at any time, there will be only one active I/O request from the user process.

Disk scheduling algorithms like $FCFS$ and $SSTF$ are useful when there are multiple pending disk requests.

Here, there is no queue of multiple requests to reorder.

Therefore, $SSTF$ cannot provide any real improvement over $FCFS$ for user programs in this case.

Expected improvement:

$0%$


UGC NET Computer Science PYQ
Once a process is executing on the CPU, which events could not occur?
A. Issues an I/O request and then placed in the Ready queue
B. Creates subprocesses and waits for them
C. Time slice expires and it joins the Waiting queue
D. Forcibly removed and put in Waiting queue due to an interrupt





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A: I/O request → goes to Waiting/Blocked, not Ready.
C: Time slice expiry → goes to Ready, not Waiting.
D: Interrupt causes preemption to Ready, not Waiting.
B is possible (process can wait for children).

UGC NET Computer Science PYQ

Modifying the software to match changes in the ever-changing environment is called as






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Adaptive maintenance means modifying software according to changes in the external environment.

Examples:

Operating system changes
Hardware changes
Database changes
Business rule changes

Here, the question says software is modified to match changes in the ever-changing environment.

So, this is Adaptive maintenance.


UGC NET Computer Science PYQ
Which of the followings shows the correct hierarchy of a layered file system in an operating system?
A. Logical File System
B. File Organization Module
C. Basic File System
D. I/O Control
E. Application Programs





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

The correct hierarchy (top to bottom) is: Application Programs → Logical File System → File Organization Module → Basic File System → I/O Control

UGC NET Computer Science PYQ
Given memory access time as $p$ nanoseconds and additional $q$ nanoseconds for handling the page fault. What is the effective memory access time if a page fault occurs once for every $100$ instructions?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Normal memory access time is $p$ nanoseconds.

Page fault occurs once for every $100$ instructions.

So, average page fault overhead per instruction is:

$\frac{q}{100}$

Therefore, effective memory access time is:

$p+\frac{q}{100}$

UGC NET Computer Science PYQ
In a file allocation system, the following allocation schemes are used:

A. Contiguous

B. Indexed

C. Linked allocation

Which of the allocation scheme(s) given above will not suffer from external fragmentation?

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Contiguous allocation needs continuous disk blocks.

So, it suffers from external fragmentation.

Linked allocation stores file blocks anywhere on disk using links.

So, it does not suffer from external fragmentation.

Indexed allocation also stores file blocks anywhere and keeps their addresses in an index block.

So, it also does not suffer from external fragmentation.

Therefore, B and C only are correct.

UGC NET Computer Science PYQ
Given below are three statements related to interrupt handling mechanism.

A. Interrupt handler routine is not stored at a fixed address in the memory.

B. CPU hardware has a dedicated wire called the interrupt request line used for handling interrupts.

C. Interrupt vector contains the memory addresses for specialized interrupt handlers.

In the context of above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Statement A is false because interrupt handler routines are reached through predefined interrupt vector entries or known handler addresses.

Statement B is true because CPU hardware uses interrupt request lines to receive interrupt signals.

Statement C is true because interrupt vector stores addresses of specialized interrupt service routines.

Therefore, only B and C are true.

UGC NET Computer Science PYQ
Match List I with List II
List-IList-II
A. fork()I. sends a signal from one process to particular process
B. exec()II. Indicates termination of current process
C. kill()III. Loads the specified program in memory.
D. exit()IV. Creates a child process.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution


$fork()$ system call creates a child process. So, $A-IV$.

$exec()$ system call loads the specified program into memory and replaces the current process image. So, $B-III$.

$kill()$ system call sends a signal to a particular process. So, $C-I$.

$exit()$ system call terminates the current process. So, $D-II$.

Final matching is $A-IV,\ B-III,\ C-I,\ D-II$.

UGC NET Computer Science PYQ
Consider the following 3 processes with the length of the CPU burst time given in milliseconds:
ProcessArrival TimeBurst Time
P108
P214
P329
What is the average waiting time for these processes if they are scheduled using preemptive shortest job first scheduling algorithm?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Preemptive SJF is also called Shortest Remaining Time First.

At time $0$, only $P1$ is available, so $P1$ runs.

At time $1$, $P2$ arrives. Remaining time of $P1=7$ and burst time of $P2=4$, so $P2$ runs.

At time $2$, $P3$ arrives, but $P2$ has remaining time $3$, which is shortest. So $P2$ continues.

Gantt chart:

$0\to1:P1,\ 1\to5:P2,\ 5\to12:P1,\ 12\to21:P3$

Completion times:

$CT(P1)=12,\ CT(P2)=5,\ CT(P3)=21$

Waiting time formula:

$WT=CT-AT-BT$

$WT(P1)=12-0-8=4$

$WT(P2)=5-1-4=0$

$WT(P3)=21-2-9=10$

Average waiting time:

$\frac{4+0+10}{3}=\frac{14}{3}=4.66$

UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

The number of bits reserved for the frame offset is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Frame size is same as page size.

Given,

Page size $=4KB$

$4KB=4\times1024=4096\ bytes$

$4096=2^{12}$

Offset bits are used to identify a byte within a page/frame.

So,

Number of frame offset bits $=\log_2(2^{12})=12$

UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

Find number of pages required for the given virtual address space.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Virtual address space $=32$ bits

So, total virtual memory size:

$2^{32}$ bytes

Page size $=4KB=2^{12}$ bytes

Number of pages:

$\frac{2^{32}}{2^{12}}=2^{20}$

UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

 What is the minimum number of bits needed for the physical address?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Main memory size $=16GB$

$16GB=16\times2^{30}=2^4\times2^{30}=2^{34}$ bytes

To address $2^{34}$ bytes, number of physical address bits required is:

$34$

UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

What is the size of page table for handling the given virtual address space, given that each page table entry is of size $2$ bytes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Number of virtual pages $=2^{20}$

Each page table entry size $=2$ bytes

Page table size:

$2^{20}\times2=2^{21}$ bytes

$2^{21}$ bytes $=2MB$

UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

 If a process of size $34KB$ is to be executed on this machine, then what will be the size of internal fragmentation for this process?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Page size $=4KB$

Process size $=34KB$

Number of pages required:

$\left\lceil\frac{34}{4}\right\rceil=\lceil8.5\rceil=9$

Total allocated memory:

$9\times4KB=36KB$

Internal fragmentation:

$36KB-34KB=2KB$

UGC NET Computer Science PYQ

Which of the statement is not true in regards to virtual memory?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Virtual memory uses secondary memory to increase the effective capacity of memory.

So, statement (a) is true.

In virtual memory, a program can be larger than the available main memory because secondary memory is used as backing storage.

So, statement (b) is also considered true in this context.

Program and data are stored in secondary memory, and required parts are brought into main memory during execution.

So, statement (c) is true.

Hence, none of the given statements is false.


UGC NET Computer Science PYQ

Which of the following statements are true?

  1. Shortest remaining time first scheduling may cause starvation
  2. Preemptive scheduling may cause starvation
  3. Round robin is better than FCFS in terms of response time

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement 1:

Shortest Remaining Time First $SRTF$ always gives preference to the process having the shortest remaining burst time.

So, if short processes keep arriving, a long process may wait for a very long time.

Therefore, statement $1$ is true.

Statement 2:

Preemptive scheduling allows a running process to be stopped and replaced by another process.

In some preemptive scheduling algorithms, low-priority or long processes may keep waiting.

Therefore, statement $2$ is true.

Statement 3:

Round Robin gives each process a fixed time quantum.

So, every process gets CPU turn quickly, which improves response time compared to FCFS.

Therefore, statement $3$ is true.


UGC NET Computer Science PYQ

In the design protocol of the critical section problem, each process must ask permission to enter the critical section in ______ code; it then executes in the critical section; once it finishes executing in the critical section it enters the ____ code. The process then enters the ____ code.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In critical section problem, the general structure of a process is:

Entry Section
Critical Section
Exit Section
Remainder Section

Entry section:

A process asks permission to enter the critical section.

Critical section:

The process executes the shared resource code.

Exit section:

The process releases permission or lock.

Remainder section:

The process executes the remaining code.

So, the correct order is:

entry section, exit section, remainder section


UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: I/O protection is ensured by a hardware trap

Reason R: I/O interrupt caused by the condition like I/O completion and device malfunction occurring within the I/O devices

In the light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because I/O protection is ensured using privileged instructions and hardware trap.

Reason R is also true because I/O interrupts may occur due to I/O completion or device malfunction.

But Reason R does not explain Assertion A.

UGC NET Computer Science PYQ
Consider a disk system with cylinders. The request to access the cylinders occurs in the following sequence:

4, 34, 10, 7, 19, 73, 2, 15, 6, 20

Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first policy is used?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Using SSTF, the head will move to the nearest request each time.

Movement order:

50 → 34 → 20 → 19 → 15 → 10 → 7 → 6 → 4 → 2 → 73

Total movement:

16 + 14 + 1 + 4 + 5 + 3 + 1 + 2 + 2 + 71 = 119

Since 1 cylinder movement takes 1 ms,

Total time = 119 ms

UGC NET Computer Science PYQ

Match the List-I and List-II

 List-I

 List-II

a. IPC
I. Resource Allocation
b. Demand Paging
II. Computational speedup
 
c. Banker's Algorithm
III. Task Control Block

d. PCB

IV. Virtual Memory

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

IPC means Inter Process Communication. It helps cooperating processes communicate and can provide computational speedup.

So,

a → II

Demand Paging is a technique used in Virtual Memory.

So,

b → IV

Banker's Algorithm is used for safe Resource Allocation and deadlock avoidance.

So,

c → I

PCB means Process Control Block. It is also related to task control information.

So,

d → III

Correct matching:

a-II, b-IV, c-I, d-III


UGC NET Computer Science PYQ

Which of the following control problem does not exist, when processes unaware of each other during interaction?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

When processes are unaware of each other, they do not coordinate or compete for shared resources in a way that forms circular waiting.


• Mutual exclusion → may still be required for shared resources

• Starvation → possible if scheduling is unfair

• Deadlock → possible if processes wait on each other


Data coherence problems occur when processes share and modify common data.

If processes are unaware and do not share data directly, this issue does not arise.


UGC NET Computer Science PYQ
 Consider a hypothetical machine with $3$ pages of physical memory, $5$ pages of virtual memory, and

$\langle A,B,C,D,A,B,E,A,B,C,D,E,B,A,B\rangle$

as the stream of page references by an application. If $P$ and $Q$ are the number of page faults with FIFO and LRU page replacement algorithms respectively, then $(P,Q)=$ _____.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

There are $3$ page frames.

For FIFO page replacement, page faults are:

$P=11$

For LRU page replacement, page faults are:

$Q=12$

So,

$(P,Q)=(11,12)$

UGC NET Computer Science PYQ
Consider a disk system having $60$ cylinders. Disk requests are received for cylinders $10,22,20,2,40,6,38$ in that order. Assuming the disk head is currently at cylinder $20$, what is the time taken to satisfy all the requests if it takes $2$ milliseconds to move from one cylinder to adjacent one and SSTF algorithm is used?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Using SSTF, from cylinder $20$ the order is approximately:

$20\to20\to22\to10\to6\to2\to38\to40$

Total head movement:

$0+2+12+4+4+36+2=60$ cylinders

Time for one cylinder movement $=2$ ms

Total time:

$60\times2=120$ milliseconds

UGC NET Computer Science PYQ
Suppose you have a Linux file system where the block size is $2K$ bytes, a disk address is $32$ bits, and an i-node contains the disk addresses of the first $12$ direct blocks of file, a single indirect block, and a double indirect block. Approximately, what is the largest file that can be represented by an i-node?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Block size $=2K=2048$ bytes

Disk address size $=32$ bits $=4$ bytes

Number of addresses in one block:

$\frac{2048}{4}=512$

Direct blocks $=12$

Single indirect blocks $=512$

Double indirect blocks:

$512\times512=262144$

Total data blocks:

$12+512+262144=262668$

Total file size:

$262668\times2048=537944064$ bytes

In MB:

$\frac{537944064}{1024\times1024}\approx513$ MB

UGC NET Computer Science PYQ
Consider a single-level page table system, with the page table stored in the memory. If the hit rate to TLB is $80\%$, and it takes $15$ nanoseconds to search the TLB, and $150$ nanoseconds to access the main memory, then what is the effective memory access time, in nanoseconds?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution


TLB hit time:

$15+150=165$ ns

TLB miss time:

$15+150+150=315$ ns

Hit ratio $=0.8$, miss ratio $=0.2$

Effective memory access time:

$0.8(165)+0.2(315)$

$=132+63=195$ ns

UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: A process involves a library function to create a thread.

Reason R: The threads make system calls to convey their resource and I/O requirement to the Kernel.

In the light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because threads are generally created using library functions such as pthread_create().


Reason R is also true because threads can make system calls for resource and I/O requirements.


But Reason R does not correctly explain Assertion A.


UGC NET Computer Science PYQ
Consider the following table of arrival time and burst time for three processes P0, P1, P2:

Process arrival time Burst time

 Processarrival time Burst time 
 P00 ms  7 
P1 1 ms 3 
P2 2ms 7 
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of a process. What is the average waiting time for the three processes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Scheduling order:

$0$ to $1$: $P0$

At $t=1$, $P1$ arrives, so it preempts $P0$

$1$ to $4$: $P1$ completes

Now remaining:

$P0 = 6,\ P2 = 7$

So,

$4$ to $10$: $P0$ completes

$10$ to $17$: $P2$ completes

Waiting times:

For $P0$:

$10 - 0 - 7 = 3$

For $P1$:

$4 - 1 - 3 = 0$

For $P2$:

$17 - 2 - 7 = 8$

Average waiting time:

$\frac{3+0+8}{3} = \frac{11}{3} = 3.67\ \text{ms}$

UGC NET Computer Science PYQ
Given below are two statements:

Which of the following statement/s is/are correct with respect to virtual memory

Statement I: Address translation is performed for every logical address used during the execution of a program

Statement II: A program can execute only when all of its components are loaded in the memory

In the light of the above statements, choose the most appropriate answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Statement I is correct because every logical address is translated into a physical address during execution.

Statement II is incorrect because in virtual memory, all parts of a program need not be loaded into memory at the same time.

UGC NET Computer Science PYQ

Select the correct order of events after power is initialized on a system.

I. Bootstrap loader is loaded from the disk
II. Kernel is loaded onto the memory
III. Firmware ROM loads boot block

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

After power is initialized, the system starts the booting process.

First, the firmware present in ROM starts execution.

So, first step is:

III. Firmware ROM loads boot block

Then the bootstrap loader is loaded from the disk.

So, second step is:

I. Bootstrap loader is loaded from the disk

After that, the bootstrap loader loads the kernel into memory.

So, third step is:

II. Kernel is loaded onto the memory

Correct order is:

III, I, II


UGC NET Computer Science PYQ

In Windows scheduling, which of the following option is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Windows uses 32 priority levels:


• 0–15 → Non-real-time (variable priorities)

• 16–31 → Real-time priorities


Thus number of non-real-time priorities = 16.



UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Limited Seats
× Aspire MCA Promotion

Game Changer NIMCET Test Series 2026

Boost your preparation with mock tests, analysis and rank-focused practice.

JOIN NOW
Ask Your Question or Put Your Review.

loading...