U.G.C. NET Exam. June 2023 Paper-II (COMPUTER SCIENCE)

Total Questions: 80

11. Match List I with List II

Correct Answer: (c) A-IV B-III C-I D-II
Solution:

12. Given below are two statements:

Correct Answer: (a) Both Statement I and Statement II are correct
Solution:

13. 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

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

Belady's anomaly actually occurs when increasing the number of frames in memory does not reduce the number of page faults for certain page replacement algorithms, such as FIFO (first In, First out). LRU is immune to belady's anomaly because it always evicts the least recently used page, regardless of the number of frames available. Shortest Remaining time first (SRTF) scheduling can lead to starvation. Since SRTF always selects the process with the shortest remaining time to execute next, longer processes may continually get preempted by shorted ones, potentially causing them to starve, i.e not getting enough CPU time to progress. In most operating systems, threads within the same process typically share the same address space, which includes the stack. Each thread has its own stack space within the shared address space of the process. So, the statement S1 and S3 are false and S2 is true.

14. The total cost of retrieving records in sorted order using an unclustered B⁺ tree is (PAverage number of records per data page, NData pages

Correct Answer: (b) (F+P)*N
Solution:

To calculate the total cost of retrieving records in sorted order using an unclustered B+ tree. We need to consider the cost of accessing each data page. This can be calculated by taking into account the average number of records per data page (P), the number of data page entry (N), and the ratio of the size of a data entry to the size of a data record (F). The formula for the total cost can be expressed as: Total cost = (F + P) * N.

15. Match List I with List II


Correct Answer: (c) A-IV B-III C-I D-II
Solution:

16. A. If some NP-complete problem P is in P that P = NP

B. TSP is in NP
C. SAT is in NP
D. Hamilton circuit problem is not NPcomplete
Choose the correct answer from the options given below :

Correct Answer: (a) A, B and C only
Solution:

If some NP-complete problem P is in P that P = NP. It simply means that this particular NP-complete problem has a polynomial-time algorithm for a single NP-complete problem, then that would mean all NP problems have polynomial-time solutions, i.e. P would equal NP. This is the definition of NP-completeness.
The Traveling salesman problem (TSP) is indeed in NP. This means that given a proposed solution, verify in polynomial time whether it's a valid solution to the problem. The Boolean satisfiability problem (SAT) is in NP. This means that given a proposed solution to a Boolean formula, verify in polynomial time whether is satisfies the formula. However, Similar to TSP whether SAT is in P.
Hamiltonian cycle if graph G contains a Hamiltonian path. Therefore, any instance of the Hamiltonian cycle problem can be reduced to an instance of the Hamiltonian path problem. Thus, the Hamiltonian cycle is NP- Hard. The Hamiltonian cycle is both, a NP. problem and NP-Hard. Therefore, it is a NP-complete problem.
So, the statement A, B and C are correct and statement D is incorrect.

17. A B-tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then maximum number of nodes that could be newly created in the process is

Correct Answer: (a) 5
Solution:

All nodes are completely full means every node has n-1 keys. Given tree has 4 levels if a new key is inserted then at every level there will be created a new node. In worst case, root node will also be broken into two parts, and we have 4 levels So, answer should be 5 because tree will be increased with one more level.

18. Suppose a circular queue of capacity (n–1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variable respectively. Initially, REAR = FRONT=0. The conditions to detect queue empty and queue full are

Correct Answer: (a) EMPTY : REAR ==FRONT FULL : (REAR +1) mod n == FRONT
Solution:

For a circular queue implemented with an array of (n-1) elements, the conditions to detect queue empty and queue full are as follows:
1. Queue Empty: when REAR = = FRONT
2. Queue full : when (REAR + 1) mod n = = FRONT.
These conditions ensure that the circular nature of the queue is properly maintained, allowing elements to wrap around the array when necessary.

19. Consider the following statements about the software product line system :

Statement I: At the interaction level, components provide an operator display interface and an interface with the communication system used.
Statement II: At the I/O management level, components handle operator authentication, report generator and query manager.
In the light of the above statements, choose the most appropriate answer from the option given below.

Correct Answer: (a) Both Statement I and Statement II are correct
Solution:

In many systems, components offer an operator display interface for users to interact with and also interface with the communication system for data exchange or interaction with other components. At the interaction level, Component provide an operator display interface and an interface with the communication system used.
omponents at the I/O management level are responsible for tasks like operator authentication, generating reports, and managing queries to ensure efficient data handling and user interaction.

20. 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.

Correct Answer: (b) Both A and R are true but R is NOT the correct explanation of A
Solution:

Many programming languages and environment provide library functions to create threads, making it easier for developers to implement multithreading in their application. Threads can indeed make system calls to convey their resource and I/O requirements to the kernel. However, this is not the primary purpose of using a library function to create a thread. The primary purpose is to enable concurrent execute within the same process. The system calls for resource and I/O requirements typically involve interactions with the operating system, but they are not directly related to the creation of threaded via library functions. So, Assertion A and Reason R are true but R is not the correct explanation of A.