## GATE 1996

Question 1 |

Let A and B be sets and let A^{c} and B^{c} denote the complements of the sets A and B. The set (A – B) ∪ (B - A) ∪ (A∩B) is equal to

A ∪ B | |

A ^{c} ∪ B^{c} | |

A ∩ B | |

A ^{c} ∩ B^{c} |

(A - B) = 1

(B - A) = 2

(A∩B) = 3

A∪B = (1∪2∪3)

(A – B) ∪ (B - A) ∪ (A∩B) = 1∪2∪3 = (A∪B)

Question 2 |

Let X = {2,3,6,12,24}, Let ≤ be the partial order defined by X ≤ Y if x divides y. Number of edge as in the Hasse diagram of (X,≤) is

3 | |

4 | |

9 | |

None of the above |

No. of edges = 4

Question 3 |

Suppose X and Y are sets and X Y and are their respective cardinalities. It is given that there are exactly 97 functions from X to Y. from this one can conclude that

|X| = 1, |Y| = 97 | |

|X| = 97, |Y| = 1 | |

|X| = 97, |Y| = 97 | |

None of the above |

|Y|

^{|X|}= 97

→ Option A only satisfies.

Question 4 |

Which of the following statements is false?

The set of rational numbers is an abelian group under addition. | |

The set of integers in an abelian group under addition. | |

The set of rational numbers form an abelian group under multiplication. | |

The set of real numbers excluding zero in an abelian group under multiplication. |

Question 5 |

Two dice are thrown simultaneously. The probability that at least one of them will have 6 facing up is

1/36 | |

1/3 | |

25/36 | |

11/36 |

1 - (5/6 × 5/6) = 1 - (25/36) = 11/36

Question 6 |

The formula used to compute an approximation for the second derivative of a function f at a point X_{0} is

f(x _{0}+h) + f(x_{0}-h)/2 | |

f(x _{0}+h) - f(x_{0}-h)/2h | |

f(x _{0}+h) + 2f(x_{0}) + f(x_{0}-h)/h^{2} | |

f(x _{0}+h) - 2f(x_{0}) + f(x_{0}-h)/h^{2} |

f(x

_{0}+h) - 2f(x

_{0}) + f(x

_{0}-h)/h

^{2}

Question 7 |

Let Ax = b be a system of linear equations where A is an m × n matrix and b is a m × 1 column vector and X is a n × 1 column vector of unknowns. Which of the following is false?

The system has a solution if and only if, both A and the augmented matrix [A b] have the same rank.
| |

If m < n and b is the zero vector, then the system has infinitely many solutions. | |

If m = n and b is non-zero vector, then the system has a unique solution. | |

The system will have only a trivial solution when m = n, b is the zero vector and rank (A) = n. |

→ Solution can be depends on rank of matrix A and matrix [A B].

→ If rank[A] = rank[A B] then it can have solution otherwise no solution.

Question 8 |

Which two of the following four regular expressions are equivalent? (ε is the empty string).

- (i) (00)*(ε+0)

(ii) (00)*

(iii) 0*

(iv) 0(00)*

(i) and (ii) | |

(ii) and (iii) | |

(i) and (iii) | |

(iii) and (iv) |

In these two, we have any no. of 0's as well as null.

Question 9 |

Which of the following statements is false?

The Halting problem of Turing machines is undecidable. | |

Determining whether a context-free grammar is ambiguous is undecidbale. | |

Given two arbitrary context-free grammars G1 and G2 it is undecidable whether L(G1) = L(G2). | |

Given two regular grammars G1 and G2 it is undecidable whether L(G1) = L(G2). |

1) Membership

2) Emtiness

3) Finiteness

4) Equivalence

5) Ambiguity

6) Regularity

7) Everything

8) Disjointness

All are decidable for Regular languages.

→ First 3 for CFL.

→ Only 1

^{st}for CSL and REC.

→ None for RE.

Question 10 |

Let L ⊆ Σ* where Σ = {a, b}. Which of the following is true?

L = {x|x has an equal number of a's and b's } is regular | |

L = {a ^{n}b^{n}|n≥1} is regular | |

L = {x|x has more a's and b's} is regular | |

L = {a ^{m}b^{n}|m ≥ 1, n ≥ 1} is regular |

^{m}b

^{n}|m ≥ 1, n ≥ 1}

Here, m and n are independent.

So 'L' Is Regular.

Question 12 |

Consider the following statements:

- (i) First-in-first out types of computations are efficiently supported by STACKS.

(ii) Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations.

(iii) Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices.

(iv) Last-in-first-out type of computations are efficiently supported by QUEUES.

Which of the following is correct?

(ii) and (iii) are true | |

(i) and (ii) are true | |

(iii) and (iv) are true | |

(ii) and (iv) are true |

(iv) LIFO computation efficiently supported by stacks.

Then given (i) and (iv) are false.

Answer:- A

Question 13 |

An advantage of chained hash table (external hashing) over the open addressing scheme is

Worst case complexity of search operations is less? | |

Space used is less | |

Deletion is easier | |

None of the above |

Question 14 |

In the balanced binary tree in the below figure, how many nodes will become unbalanced when a node is inserted as a child of the node “g”?

1 | |

3 | |

7 | |

8 |

a, b, c are going to unbalance.

Question 15 |

Which of the following sequences denotes the post order traversal sequence of the tree of question 14?

f e g c d b a | |

g c b d a f e | |

g c d b f e a | |

f e d g c b a |

Left → Right → Root

g c d b f e a

Question 16 |

Relative mode of addressing is most relevant to writing

coroutines | |

position – independent code | |

shareable code | |

interrupt handlers |

Question 17 |

The pass number for each of the following activities

- 1. Object code generation

2. Literals added to literal table

3. Listing printed

4. Address resolution of local symbols

That occur in a two pass assembler respectively are

1, 2, 1, 2 | |

2, 1, 2, 1 | |

2, 1, 1, 2 | |

1, 2, 2, 2 |

__Pass 1__:

1) Assign addresses to all statements in the program.

2) Save the values assigned to all labels for use in pass 2.

3) Perform some processing of assembler directives.

__Pass 2__:

1) Assemble instructions.

2) Generate data values defined by BYTE, WORD etc.

3) Perform processing of assembler directives not done during pass 1.

4) Write the program and assembling listing.

Question 18 |

The process state transition diagram in below figure is representative of

a batch operating system | |

an operating system with a preemptive scheduler | |

an operating system with a non-preemptive scheduler | |

a uni-programmed operating system |

So this is preemptive.

Question 19 |

A critical section is a program segment

which should run in a certain specified amount of time | |

which avoids deadlocks | |

where shared resources are accessed | |

which must be enclosed by a pair of semaphore operations, P and V |

Question 20 |

Which of the following is an example of spooled device?

A line printer used to print the output of a number of jobs. | |

A terminal used to enter input data to a running program. | |

A secondary storage device in a virtual memory system. | |

A graphic display device. |

Question 21 |

A ROM is sued to store the table for multiplication of two 8-bit unsigned integers. The size of ROM required is

256 × 16 | |

64 K × 8 | |

4 K × 16 | |

64 K × 16 |

No. of results possible = 2

^{8}× 2

^{8}= 2

^{16}= 64K

Then total size of ROM = 64K × 16

Question 22 |

Number of machine cycles required for RET instruction in 8085 microprocessor is

1 | |

2 | |

3 | |

5 |

2 for stack operation.

Total no. of cycles = 2+1 = 3

Question 23 |

Both’s algorithm for integer multiplication gives worst performance when the multiplier pattern is

101010 …..1010 | |

100000 …..0001 | |

111111 …..1111 | |

011111 …..1110 |

Question 24 |

For the daisy chain scheme of connecting I/O devices, which of the following statements is true?

It gives non-uniform priority to various devices. | |

It gives uniform priority to all devices | |

It is only useful for connecting slow devices to a processor device. | |

It requires a separate interrupt pin on the processor for each device. |

→ In this all devices connected serially.

→ High priority devices placed first, followed by low priority devices.

Question 25 |

Consider the following floating point number representation

The exponent is in 2's complement representation and mantissa is in the sign magnitude representation. The range of the magnitude of the normalized numbers in this representation is

0 to 1 | |

0.5 to 1 | |

2 ^{-23} to 0.5 | |

0.5 to (1-2 ^{-23}) |

^{-23}.

Question 26 |

Let R denotes the set of real numbers. Let f: R×R → R×R be a bijective function defined by f(x,y) = (x+y,x-y), The inverse function of f is given by

Question 27 |

Let R be a non-empty relation on a collection of sets defined by A R B if and only if A ∩ B = ф. Then, (pick the true statement)

R is reflexive and transitive | |

R is symmetric and not transitive | |

R is an equivalence relation | |

R is not reflexive and not symmetric |

Now,

A ∩ B = ф

& B ∩ C = ф

But A ∩ B ≠ ф

So, R is not transitive.

A ∩ B = A, so R is not reflexive.

If A ∩ B = ф

then definitely B ∩ A = ф.

Hence, R is symmetric.

So, option (B) is true.

Question 28 |

Which of the following is false? Read ∧ as AND, ∨ as OR, ~ as NOT, → as one way implication and ↔ as two way implication.

((x → y) ∧ x) → y | |

((x → y) ∧ (x ∧ y)) → x | |

(x → (x ∨ ψ)) | |

((x ∨ y) ↔ (x → y) |

then option (D) will be False.

Question 29 |

Which one of the following is false?

The set of all bijective functions on a finite set forms a group under function composition.
| |

The set {1, 2, ……., p–1} forms a group under multiplication mod p where p is a prime number. | |

The set of all strings over a finite alphabet forms a group under concatenation. | |

A subset s ≠ ф of G is a subgroup of the group ^{-1} ∈ s. |

Question 30 |

Newton-Raphson iteration formula for finding 3√c, where c > 0 is,

Question 31 |

The matrices and commute under multiplication

if a = b or θ = nπ, is an integer | |

always | |

never | |

if a cos θ ≠ b sin θ |

Question 32 |

The probability that top and bottom cards of a randomly shuffled deck are both aces in

4/52×4/52 | |

4/52×3/52 | |

4/52×3/51 | |

4/52×4/51 |

_{1}: First card being ace

E

_{2}: Last card being ace

Note that E

_{1}and E

_{2}are dependent events, i.e., probability of last card being ace if first is ace will be lesser than the probability of last card being ace if first card is not ace.

So, probability of first card being ace = 4/52

Probability of last card being ace given that first card is ace is,

P(E

_{2}/ E

_{1}) = 3/51

∴ P(E

_{1}and E

_{2}) = P(E

_{1}) ⋅ P(E

_{2}/ E

_{1}) = 4/52 × 3/51

Question 33 |

If L_{1} and L_{2} are context free languages and R a regular set, one of the languages below is not necessarily a context free language. Which one?

L _{1}, L_{2} | |

L _{1} ∩ L_{2} | |

L _{1} ∩ R | |

L _{1} ∪ L_{2} |

Question 34 |

Define for a context free language L ⊆ {0,1}*, init(L) = {u ∣ uv ∈ L for some v in {0,1}∗} (in other words, init(L) is the set of prefixes of L)

Let L = {w ∣ w is nonempty and has an equal number of 0’s and 1’s}

Then init(L) is

the set of all binary strings with unequal number of 0’s and 1’s | |

the set of all binary strings including the null string | |

the set of all binary strings with exactly one more 0’s than the number of 1’s or one more 1 than the number of 0’s | |

None of the above |

Question 35 |

The grammar whose productions are

→ if id then → if id then else → id := id

is ambiguous because

the sentence if a then if b then c:=d | |

the left most and right most derivations of the sentence if a then if b then c:=d give rise top different parse trees | |

the sentence if a then if b then c:=d else c:=f has more than two parse trees | |

the sentence if a then if then c:=d else c:=f has two parse trees |

"if a then if b then c:=d else c:=f".

__Parse tree 1__:

__Parse tree 2__:

Question 36 |

The minimum number of interchanges needed to convert the array

89, 19, 40, 17, 12, 10, 2, 5, 7, 11, 6, 9, 70

into a heap with the maximum element at the root is

0 | |

1 | |

2 | |

3 |

Question 37 |

The recurrence relation

T(1) = 2 T(n) = 3T(n/4)+n

has the solution, T(n) equals to

O(n) | |

O(log n) | |

O(n ^{3/4}) | |

None of the above |

Question 38 |

The average number of key comparisons done on a successful sequential search in list of length n is

log n | |

n-1/2 | |

n/2 | |

n+1/2 |

= No. of comparisons if element present in 1

^{st}position + No. of comparisons if element present in 2

^{nd}position + ............. + No. of comparisons if element present in n

^{th}position

= 1 + 2 + 3 + ... + n

= n(n+1)/2

Since there are n elements in the list, so average no. of comparisons

= Total comparisons/Total no. of elements

= (n(n+1)/2)/n

= n+1/2

Question 39 |

A binary search tree is generated by inserting in order the following integers:

50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24

The number of nodes in the left subtree and right subtree of the root respectively is

(4, 7) | |

(7, 4) | |

(8, 3) | |

(3, 8) |

So greater than 50 will be in right subtree of 50 and less than 50 in left subtree.

So, answer will be (7, 4).

Question 40 |

Quicksort is run on two inputs shown below to sort in ascending order taking first element as pivot,

(i) 1,2,3,...,n (ii) n,n-1,n-2,...,2,1

Let C_{1} and C_{2} be the number of comparisons made for the inputs (i) and (ii) respectively. Then,

C _{1} < C_{2} | |

C _{1} > C_{2} | |

C _{1} = C_{2} | |

we cannot say anything for arbitrary n. |

So, option is (C) is correct.

Question 41 |

Which of the following macros can put a micro assembler into an infinite loop?

(i) .MACRO M1 X .IF EQ, X ;if X=0 then M1 X + 1 .ENDC .IF NE X ;IF X≠0 then .WORD X ;address (X) is stored here .ENDC .ENDM (ii) .MACRO M2 X .IF EQ X M2 X .ENDC .IF NE, X .WORD X+1 .ENDC .ENDM

(ii) only | |

(i) only | |

both (i) and (ii) | |

None of the above |

Question 42 |

The correct matching for the following pairs is

A. Activation record 1. Linking loader B. Location counter 2. Garbage collection C. Reference counts 3. Subroutine call D. Address relocation 4. Assembler

A – 3 B – 4 C – 1 D – 2 | |

A – 4 B – 3 C – 1 D – 2 | |

A – 4 B – 3 C – 2 D – 1 | |

A – 3 B – 4 C – 2 D – 1 |

An assembler uses location counter value to give address to each instruction which is needed for relative addressing as well as for jump labels.

Reference count is used by garbage collector to clear the memory whose reference count be comes 0.

Linker loader is a loader which can load several compiled codes and link them together into a single executable. Thus it needs to do relocation of the object codes.

Question 43 |

A 1000 Kbyte memory is managed using variable partitions but to compaction. It currently has two partitions of sizes 200 Kbytes and 260 Kbytes respectively. The smallest allocation request in Kbytes that could be denied is for

151 | |

181 | |

231 | |

541 |

So, smallest allocation request which can be denied is 181 KB.

Question 44 |

A solution to the Dining Philosophers Problem which avoids deadlock is

ensure that all philosophers pick up the left fork before the right fork | |

ensure that all philosophers pick up the right fork before the left fork | |

ensure that one particular philosopher picks up the left fork before the right fork, and that all other philosophers pick up the right fork before the left fork | |

None of the above |

To avoid this, atleast one philosopher should choose its first chopstick in different way so that circular loop is not formed.

Question 45 |

Four jobs to be executed on a single processor system arrive at time 0^{+} in the order A, B, C, D. their burst CPU time requirements are 4, 1, 8, 1 time units respectively. The completion time of A under round robin scheduling with time slice of one time unit is

10 | |

4 | |

8 | |

9 |

∴ Completion time of A is 9 unit.

Question 46 |

Consider the circuit given below which has a four bit binary number b_{3}b_{2}b_{1}b_{0} as input and a five bit binary number d_{4}d_{3}d_{2}d_{1}d_{0} as output. The circuit implements:

Binary of Hex conversion
| |

Binary to BCD conversion | |

Binary to grey code conversion | |

Binary to radix-12 conversion |

Whenever, b

_{2}= b

_{3}= 1, then only 0100, i.e., 4 is added to the given binary number. Lets write all possibilities for b.

Note that the last 4 combinations leads to b

_{3}and b

_{2}as 1. So, in these combinations only 0010 will be added.

1100 is 12

1101 is 13

1110 is 14

1111 is 15

in binary unsigned number system.

1100 + 0100 = 10000

1101 + 0100 = 10001, and so on.

This is conversion to radix 12.

Question 47 |

Consider the circuit in below figure. f implements

A + B + C | |

A ⊕ B ⊕ C | |

AB + BC + CA |

Question 48 |

Consider the given figure of state table for a sequential machine. The number of states in the minimized machine will be

4 | |

3 | |

2 | |

1 |

Question 49 |

What is the equivalent Boolean expression in product-of-sums form for the Karnaugh map given below.

None of the above |

Question 50 |

A micro program control unit is required to generate a total of 25 control signals. Assume that during any microinstruction, at most two control signals are active. Minimum number of bits required in the control word to generate the required control signals will be

2 | |

2.5 | |

10 | |

12 |

= 5+5

= 10 bits

Question 51 |

Let f be a function defined by

Find the values for the constants a, b, c and d so that f is continuous and differentiable every where on the real line.

Theory Explanation. |

Question 52 |

A binary search tree is used to locate the number 43. Which of the following probe sequences are possible and which are not? Explain.

61 52 14 17 40 43 | |

2 3 50 40 60 43 | |

10 65 31 48 37 43 | |

81 61 52 14 41 43 | |

17 77 27 66 18 43 |

Question 53 |

A logic network has two data inputs A and B, and two control inputs C_{0} and C_{1}. It implements the function F according to the following table.

Implement the circuit using one 4 to 1 Multiplexer, one 2-input Exclusive OR gate, one 2-input AND gate, one 2-input OR gate and one Inverter.

Theory Explanation. |

Question 54 |

An 8052 based system has an output port with address 00H. Consider the following assembly language program.

ORG 0100H MVI A, 00H LXI H, 0105H OUT 00H INR A PCHL HLT

(a) What does the program do with respect to the output port 00H?

(b) Show the wave forms at the three least significant bits of the port 00H.

Theory Explanation. |

Question 55 |

A demand paged virtual memory system uses 16 bit virtual address, page size of 256 bytes, and has 1 Kbyte of main memory. LRU page replacement is implemented using a list whose current status (page number in decimal) is

For each hexadecimal address in the address sequence given below

00FF, 010D, 10FF, 11B0

indicate

(i) the new status of the list

(ii) page faults, if any, and

(iii) page replacements, if any

Theory Explanation. |

Question 56 |

Let F be the collection of all functions f: {1,2,3} → {1,2,3}. If f and g ∈ F, define an equivalence relation ~ by f ~ g if and only if f(3) = g(3).

a) Find the number of equivalence classes defined by ~.

b) Find the number of elements in each equivalence class.

Theory Explanation. |

Question 57 |

The Fibonacci sequence {f_{1},f_{2},f_{3},...,f_{n}} is defined by the following recurrence:

f_{n+2}= f_{n+1}+ f_{n}, n ≥ 1; f_{2}=1 : f_{1}=1

Prove by induction that every third element of the sequence is even.

Theory Explanation. |

Question 58 |

Let and be two matrices such that AB = I. Let and CD = 1. Express the elements of D in terms of the elements of B.

Theory Explanation. |

Question 59 |

Let G be a context-free grammar where G = ({S, A, B, C},{a,b,d},P,S) with the productions in P given below.

S → ABAC A → aA ∣ ε B → bB ∣ ε C → d

(ε denotes null string). Transform the grammar G to an equivalent context-free grammar G' that has no ε productions and no unit productions. (A unit production is of the form x → y, and x and y are non terminals.)

Theory Explanation. |

Question 60 |

Given below are the transition diagrams for two finite state machine M_{1} and M_{2} recognizing languages L_{1} and L_{2} respectively.

(a) Display the transition diagram for a machine that recognizes L_{1}.L_{2}, obtained from transition diagrams for M_{1} and M_{2} by adding only ε transitions and no new states.

(b) Modify the transition diagram obtained in part(a) obtain a transition diagram for a machine that recognizes (L_{1}.L_{2})∗ by adding only ε transitions and no new states. (Final states are enclosed in double circles).

Theory Explanation. |

Question 61 |

Let Q = ({q_{1},q_{2}}, {a,b}, {a,b,Z}, δ, Z, ϕ) be a pushdown automaton accepting by empty stack for the language which is the set of all non empty even palindromes over the set {a,b}. Below is an incomplete specification of the transitions δ. Complete the specification. The top of the stack is assumed to be at the right end of the string representing stack contents.

(1) δ(q_{1},a,Z) = {(q_{1},Za)} (2) δ(q_{1},b,Z) = {(q_{1},Zb)} (3) δ(q_{1},a,a) = {(.....,.....)} (4) δ(q_{1},b,b) = {(.....,.....)} (5) δ(q_{2},a,a) = {(q_{2},ϵ)} (6) δ(q_{2},b,b) = {(q_{2},ϵ)} (7) δ(q_{2},ϵ,Z) = {(q_{2},ϵ)}

Theory Explanation. |

Question 62 |

A two dimensional array A[1...n][1...n] of integers is partially sorted if

∀i, j ∈ [1...n−1], A[i][j] < A[i][j+1] and A[i][j] < A[i+1][j]

Fill in the blanks:

(a) The smallest item in the array is at A[i][j] where i=............and j=..............

(b) The smallest item is deleted. Complete the following O(n) procedure to insert item x (which is guaranteed to be smaller than any item in the last row or column) still keeping A partially sorted.

procedureinsert (x:integer);vari,j:integer;begin(1) i:=1; j:=1, A[i][j]:=x; (2)while(x > ...... or x > ......) do (3) if A[i+1][j] < A[i][j] ......... then begin (4) A[i][j]:=A[i+1][j]; i:=i+1; (5)end(6)elsebegin(7) ............ (8)end(9) A[i][j]:= .............end

Theory Explanation. |

Question 63 |

Insert the characters of the string K R P C S N Y T J M into a hash table of size 10.

Use the hash function

h(x) = (ord(x) – ord("a") + 1) mod10

and linear probing to resolve collisions.

(a) Which insertions cause collisions?

(b) Display the final hash table.

Theory Explanation. |

Question 64 |

A complete, undirected, weighted graph G is given on the vertex {0, 1,...., n−1} for any fixed ‘n’. Draw the minimum spanning tree of G if

(a) the weight of the edge (u,v) is ∣u − v∣

(b) the weight of the edge (u,v) is u + v

Theory Explanation. |

Question 65 |

Let G be the directed, weighted graph shown in below figure.

We are interested in the shortest paths from A.

(a) Output the sequence of vertices identified by the Dijkstra’s algorithm for single source shortest path when the algorithm is started at node A.

(b) Write down sequence of vertices in the shortest path from A to E.

(c) What is the cost of the shortest path from A to E?

Theory Explanation. |

Question 66 |

Consider the following program that attempts to locate an element x in a sorted array a[] using binary search. Assume N>1. The program is erroneous. Under what conditions does the program fail?

vari,j,k: integer; x: integer; a:= array; [1...N]ofinteger;begini:= 1; j:= N;repeatk:(i+j) div 2; if a[k] < x then i:= kelsej:= kuntil(a[k] = x) or (i >= j); if (a[k] = x)thenwriteln ('x is in the array')elsewriteln ('x is not in the array')end;

Theory Explanation. |

Question 67 |

Consider the following program in pseudo-pascal syntax. What is printed by the program if parameter a in procedure test 1 is passed as

(i) call-by-reference parameter

(ii) call-by-value-result parameter

programExample (input, output)varb: integer;proceduretest2:beginb:=10;endproceduretest1 (a:integer):begina:=5; writeln ('point 1: ', a, b); test2; writeln ('point 2: ', a, b);endbegin(*Example*) b:=3; test1(b); writeln('point3:', b);end

Theory Explanation. |

Question 68 |

Consider the syntax-directed translation schema (SDTS) shown below:

E → E + E {print “+”} E → E ∗ E {print “.”} E → id {print id.name} E → (E)

An LR-parser executes the actions associated with the productions immediately after a reduction by the corresponding production. Draw the parse tree and write the translation for the sentence.

(a+b)∗(c+d), using the SDTS given above.

Theory Explanation. |

Question 69 |

The concurrent programming constructs fork and join are as below:

fork

N = 2 M = 2 fork L3 fork L4 S1 L1:join N S3 L2:join M S5 L3:S2 goto L1 L4:S4 goto L2 next:

Theory Explanation. |

Question 70 |

A computer system uses the Banker’s Algorithm to deal with deadlocks. Its current state is shown in the table below, where P0, P1, P2 are processes, and R0, R1, R2 are resources types.

(a) Show that the system can be in this state.

(b) What will the system do on a request by process P0 for one unit of resource type R1?

Theory Explanation. |

Question 71 |

A file system with a one-level directory structure is implemented on a disk with disk block size of 4K bytes. The disk is used as follows:

Disk-block 0: File Allocation Table, consisting of one 8-bit entry per date block, representing the data block address of the next date block in the file Disk block 1: Directory, with one 32 bit entry per file: Disk block 2: Data block 1; Disk block 3: Data block 2; etc.

(a) What is the maximum possible number of files?

(b) What is the maximum possible file size in blocks?

Theory Explanation. |

Question 72 |

Consider the synchronous sequential circuit in the below figure.

(a) Draw a state diagram, which is implemented by the circuit. Use the following names for the states corresponding to the values of flip-flops as given below.

(b) Given that the initial state of the circuit is S_{4}, identify the set of states, which are not reachable.

Theory Explanation. |

Question 73 |

A hard disk is connected to a 50 MHz processor through a DMA controller. Assume that the initial set-up of a DMA transfer takes 1000 clock cycles for the processor, and assume that the handling of the interrupt at DMA completion requires 500 clock cycles for the processor. The hard disk has a transfer rate of 2000 Kbytes/sec and average block transferred is 4 K bytes. What fraction of the processor time is consumed by the disk, if the disk is actively transferring 100% of the time?

Theory Explanation. |

Question 74 |

A computer system has a three level memory hierarchy, with access time and hit ratios as shown below:

(a) What should be the minimum sizes of level 1 and 2 memories to achieve an average access time of less than 100 nsec?

(b) What is the average access time achieved using the chosen sizes of level 1 and level 2 memories?

Theory Explanation. |

Question 75 |

A library relational database system uses the following schema

USERS (User#, UserName, HomeTown) BOOKS (Book#, BookTitle, AuthorName) ISSUED (Book#, User#, Date)

Explain in one English sentence, what each of the following relational algebra queries is designed to determine

(a) σ User #=6 (11 User #, Book Title ((USERS ISSUED) BOOKS)) (b) σ Author Name (BOOKS (σ Home Town) = Delhi (USERS ISSUED)))

Theory Explanation. |