GATE CS question library
Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.
Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.
20 on this page
Consider the following multi-threaded code segment (in a mix of C and pseudo-code), invoked by two processes and , and each of the processes spawns two threads and : int x = 0; // global Lock L1; // global main () { create a thread to execute foo(); // Thread T1 create a thread to execute foo(); // Thread T2 wait for the …
Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing of resources are done by holding a global lock . The following scheme is used to own a resource instance: function OWNRESOURCE(Resource R) Acquire lock L // a global lock if R …
If the numerical value of a -byte unsigned integer on a little endian computer is more than that on a big endian computer, which of the following choices represent(s) the unsigned integer on a little endian computer?
Consider a computer network using the distance vector routing algorithm in its network layer. The partial topology of the network is shown below. The objective is to find the shortest-cost path from the router to routers and . Assume that does not initially know the shortest routes to and . Assume that has three …
Which of the following regular expressions represent(s) the set of all binary numbers that are divisible by three? Assume that the string is divisible by three.
Consider the following directed graph: Which of the following is/are correct about the graph?
Consider a three-level page table to translate a bit virtual address to a physical address as shown below: The page size is bytes and page table entry size at every level is bytes. A process is currently using bytes virtual memory which is mapped to …
Consider the following program #include <stdio.h> int foo(int x, int y, int q) { if ((x<=0) && (y<=0)) return q; if (x<=0) return foo(x, y-q, q); if (y<=0) return foo(x-q, y, q); return foo(x, y-q, q) + foo(x-q, y, q); } int main( ) { int r = foo(15, 15, 10); printf(“%d”, r); return 0; } The output of the program …
Let be a set consisting of elements. The number of tuples of the form such that and are subsets of , and is ___________
Consider the following augmented grammar with as the set of terminals. Let …
Consider a Boolean function such that The number of literals in the minimal sum-of-products expression of is _________
Consider a network using the pure medium access control protocol, where each frame is of length bits. The channel transmission rate is Mbps ( bits per second). The aggregate number of transmissions across all the nodes (including new frame transmissions and retransmitted frames due to collisions) is modelled as a …
Consider a pipelined processor with stages, , , , , and . Each stage of the pipeline, except the stage, takes one cycle. Assume that the …
In a directed acyclic graph with a source vertex , the of a directed path is defined to be the product of the weights of the edges on the path. Further, for a vertex other than , the quality-score of is defined to be the maximum among the quality-scores of all the paths from to …
Raman is confident of speaking English _______six months as he has been practising regularly_______the last three weeks
His knowledge of the subject was excellent but his classroom performance was_______.
Select the word that fits the analogy: Cook : Cook :: Fly : _______
The dawn of the st century witnessed the melting glaciers oscillating between giving too much and too little to billions of people who depend on them for fresh water. The UN climate report estimates that without deep cuts to man-made emissions, at least of the northern hemisphere’s surface permafrost could melt by the end of the century. Given …
There are multiple routes to reach from node to node , as shown in the network. The cost of travel on an edge between two nodes is given in rupees. Nodes and are toll booths. The toll price at toll booths marked …
Goods and Services Tax (GST) is an indirect tax introduced in India in that is imposed on the supply of goods and services, and it subsumes all indirect taxes except few. It is a destination-based tax imposed on goods and services used, and it is not imposed at the point of origin from where goods come. GST also has a few components specific to …
