GATE CSE
(a)$$\,\,\,\,$$ What is the number of sets in the cache?
(b)$$\,\,\,\,$$ What is the size (in bits) of the tag field per cache block?
(c)$$\,\,\,\,$$ What is the number and size of comparators required for tag matching?
(d)$$\,\,\,\,$$ How many address bits are required to find the byte offset within a cache block?
(e)$$\,\,\,\,$$ What is the total amount of extra memory (in bytes) required for the tag bits?
$$X.$$ Indirect Addressing
$$Y.$$ Indexed Addressing
$$Z.$$ Base Register Addressing
$${\rm I}.\,\,$$Array implementation
$${\rm II}.\,\,$$Writing relocatable code
$${\rm III}.\,\,$$Passing array as parameter
![GATE CSE 2001 Computer Organization - Alu Data Path and Control Unit Question 9 English](https://gateclass.cdn.examgoal.net/KqZ782HBdn2DcN9TW/8nUnpocIo68M5JIE769DJ6r6Bkie1/3orRfRCEi2zUb2q5JXZnw4/uploadfile.jpg)
The $$CPU$$ instruction $$''push$$ $$r'',$$ where $$r=A$$ or $$B,$$ has the specification
$$\eqalign{
& \,\,\,\,\,\,\,\,\,\,\,\,\,M\left[ {SP} \right] \leftarrow r \cr
& \,\,\,\,\,\,\,\,\,\,\,\,\,SP \leftarrow SP - 1 \cr} $$
How many $$CPU$$ clock cycles are needed to execute the $$''push$$ $$r''$$ instruction?
![GATE CSE 2001 Digital Logic - Sequential Circuits Question 23 English](https://gateclass.static.cdn.examgoal.net/GGTsZuVkXboLmbe1P/6T58jWjjNycXTDacvru5VrjyhviQL/02ZT0nFYU8SOEFECJAutj2/uploadfile.jpg)
Which one of the following is correct state sequence of the circuit?
![GATE CSE 2001 Digital Logic - Sequential Circuits Question 16 English 1](https://gateclass.cdn.examgoal.net/xcJr63MYnx5R4nUy3/NW7Ug3jM5FaizRszJUwmPXCpyLKlb/f3mkGZcwyOvmoCZbNqNUN2/uploadfile.jpg)
Consider the following timing diagram of $$X$$ and $$C;$$ the clock period of $$C>40$$ nanosecond which one is the correct plot of $$Y?$$
![GATE CSE 2001 Digital Logic - Sequential Circuits Question 16 English 2](https://imagex.cdn.examgoal.net/atqpFVsbI2bH3TlTd/CchHBENZJkaDKsQlHp850rHRQyhk3/lGjDc3MeJlkgZUi8osG5N5/uploadfile.jpg)
![GATE CSE 2001 Digital Logic - Combinational Circuits Question 16 English](https://gateclass.cdn.examgoal.net/5SN7VUpdoVD34qUYy/cwI8ugiGbnGqIaxuDsVOsoPkTaSPR/oSgToyFm95pBhFEQcHH0xi/uploadfile.jpg)
Which of the following is true?
![GATE CSE 2001 Digital Logic - K Maps Question 12 English](https://imagex.cdn.examgoal.net/W9vv6oaoWwaFHuHmW/k3YiUNklIOjc8yfLUdo2urAYiO4M5/Haj6qc25374qKQ7V9KZFKn/uploadfile.jpg)
$$S1:\,f\,\left( {E\, \cup \,F} \right)\, = \,f\left( E \right)\, \cup \,f\,\left( F \right)$$
$$S2:\,f\,\left( {E\, \cap \,F} \right)\, = \,f\left( E \right)\, \cap \,f\,\left( F \right)$$
Which of the following is true about S1 and S2?
S1: There exist infinite sets A, B, C such that
$$A\, \cap \left( {B\, \cup \,C} \right)$$ is finite.
S2: There exist two irrational numbers x and y such that (x + y) is rational.
Which of the following is true about S1 and S2?
$${R_1}\,\,\left( {a,\,\,b} \right)\,\,\,iff\,\,\left( {a + b} \right)$$ is even over the set of integers
$${R_2}\,\,\left( {a,\,\,b} \right)\,\,\,iff\,\,\left( {a + b} \right)$$ is odd over the set of integers
$${R_3}\,\,\left( {a,\,\,b} \right)\,\,\,iff\,\,a.b > 0$$ over the set of non-zero rational numbers
$${R_4}\,\,\left( {a,\,\,b} \right)\,\,\,iff\,\,\left| {a - b} \right| \le 2$$ over the set of natural numbers
Which of the following statements is correct?
S1: The sum of two singular n x n matrices may be non-singular
S2: The sum of two n x n non-singular matrices may be singular
Which of the following statements is correct?
$$F1:P \Rightarrow \neg P$$
$$F2:\left( {P \Rightarrow \neg P} \right) \vee \left( {\neg P \Rightarrow } \right)$$
Which of the following statements is correct?
(a) What is the total capacity of the disk?
(b) What is the data transfer rate?
(c) What is the percentage of time the $$CPU$$ is required for this disk $${\rm I}/O$$ for byte-wise interrupts driven transfer?
(d) What is the maximum percentage of time the $$CPU$$ is held up for this disk $${\rm I}/O$$ for cycle-stealing $$DMA$$ transfer ?
(a) Consider a set of disk requests to read data from tracks $$32, 7, 45, 5$$ and $$10.$$ Assuming that the elevator algorithm is used to schedule disk requests, and the head is initially at track $$25$$ moving up (towards larger track numbers),
what is the total seek time for servicing the requests?
(b) Consider an initial set of $$100$$ arbitrary disk requests and assume that no new disk requests arrive while servicing these requests. If the head is initially at track $$0$$ and the elevator algorithm is used to schedule disk requests, what is the worst case time to complete all the requests?
Repeat
flag[i]=true;
turn=j;
while (P) do no-op;
Enter critical section, perform actions, then
exit critical section
Flag[i]=false;
Perform other non-critical section actions.
Until false;
For the program to guarantee mutual exclusion, the predicate P in the while loop should be [P1] int*g(void)
{
int x=10;
return(&x);
}
[P2] int*g(void)
{
int *px;
*px = 10;
return px;
}
[P3] int*g(void)
{
int *px
px =(int*)malloc (size of (int));
*px = 10;
return px;
}
Which of the above three functions are likely to cause problems with pointers?void abc(char *s)
{
if(s[0]=='\0') return;
abc(s+1);
abc(s+1);
printf("%c",s[0]);
}
main()
{
abc("123");
}
(a) What will be the output of the program?
(b) If abc(s) is called with a null-terminated string s of length n characters (not counting the null ('\0') character), how many characters will be printed by abc(s)?
Program P1()
{
x=10;
y=3;
func1(y,x,x);
print x;
print y;
}
func1(x,y,z)
{
y=y+4;
z=x+y+z;
}
Program P2
var n:int;
procedure W(var x:int)
begin
x=x+1;
print x;
end
procedure D
begin
var n:int;
n=3;
W(n);
end
begin \\begin P2
n = 10;
D;
end
If the language has dynamic scooping and parameters are passed by reference,
what will be printed by the program?Which of the following statements about $$X$$ is correct?
$${S_1}\,\,:\,\,\left\{ {{0^{2n}}\left| {n \ge 1} \right.} \right\}$$ is a regular language
$${S_2}\,\,:\,\,\left\{ {{0^m}{1^n}{0^{m + n}}\left| {m \ge 1} \right.\,\,and\,\,n \ge \left. 1 \right\}} \right.$$ is a regular language
Which of the following statements is correct?
$${L_1} = \left\{ {w\,w\left| {w \in {{\left\{ {a,\,b} \right\}}^ * }} \right.} \right\}$$
$${L_2} = \left\{ {w\,{w^R}\left| {w \in {{\left\{ {a,\,b} \right\}}^ * },} \right.{w^R}\,\,} \right.$$ is the reverse of $$\left. w \right\}$$
$${L_3} = \left\{ {{0^{2i}}\left| {i\,\,} \right.} \right.$$ is an integer$$\left. \, \right\}$$
$${L_4} = \left\{ {{0^{{i^2}}}\left| {i\,\,} \right.} \right.$$ is an integer$$\left. \, \right\}$$
Which of the languages are regular?