1
Consider a paging system that uses $1$-level page table residing in main memory and a TLB for address translation. Each main memory access takes $100$ ns and TLB lookup takes $20$ ns. Each page transfer to/from the disk takes $5000$ ns. Assume that the TLB hit ... is read from disk. TLB update time is negligible. The average memory access time in ns (round off to $1$ decimal places) is ___________
2
Which one of the following regular expressions represents the set of all binary strings with an odd number of $1’$s? $((0+1)^*1(0+1)^*1)^*10^*$ $(0^*10^*10^*)^*0^*1$ $10^*(0^*10^*10^*)^*$ $(0^*10^*10^*)^*10^*$
3
Consider the following statements. Symbol table is accessed only during lexical analysis and syntax analysis. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment. Errors violating the condition any variable must be ... of the above statements is/are TRUE? I only I and III only Ⅱ only None of Ⅰ, Ⅱ and Ⅲ
4
Consider the following C functions. int tob (int b, int* arr) { int i; for (i = 0; b>0; i++) { if (b%2) arr [i] = 1; else arr[i] = 0; b = b/2; } return (i); } int pp(int a, int b) { int arr; int i, tot = 1, ex, len; ex = a; len = tob(b, arr); for (i=0; i<len ; i++) { if (arr[i] ==1) tot = tot * ex; ex= ex*ex; } return (tot) ; } The value returned by $pp(3,4)$ is _______.
5
For $n>2$, let $a \in \{0,1\}^n$ be a non-zero vector. Suppose that $x$ is chosen uniformly at random from $\{0,1\}^n$. Then, the probability that $\displaystyle{} \Sigma_{i=1}^n a_i x_i$ is an odd number is______________
6
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Assume that the table size is $23$. Then the address returned by probe $1$ in the probe sequence (assume that the probe sequence begins at probe $0$) for key value $k=90$ is_____________.
A direct mapped cache memory of $1$ MB has a block size of $256$ bytes. The cache has an access time of $3$ ns and a hit rate of $94 \%$. During a cache miss, it takes $2$0 ns to bring the first word of a block from the main memory, while each subsequent word takes $5$ ns. The word size is $64$ bits. The average memory access time in ns (round off to $1$ decimal place) is______.
A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it, counting repetitions. What is the number of multisets of size $4$ that can be constructed from n distinct elements so that at least one element occurs exactly twice? How many multisets can be constructed from n distinct elements?