If a system contains n processor and n processes then what will be the maximum and minimum processes in running state respectively?
-
Solution
When system contains n processor and n processes, then maximum number of processes in running state can be n with each processor containing maximum of one processes in the running state. The minimum number is 0 with no processor having a process in running state.
A computer system implements 8 kilobyte pages and a +32-bit physical address space. Each page table entry containsa valid bit, a dirty bit, three permission bits, and the translation. If the maximum size of the page table of a process is 24 megabytes, the length of the virtual address supported by the system is _______ bits.
-
Solution
Page size = 8 KB
PAS = 32 bitsNumber of frames = \(\frac{2^{32}}{2^{13}}=2^{19}\)=frames
One entry require 24 bits
Page Table size = n × c
24×220×3 = n×24
n = 223 pages
Then length of virtual address is
23 + 13 = 36 bits
he number of states in the minimal deterministic finite automaton corresponding to the regular expression (0 + 1)* (10) is ______
-
Solution
Ans = 3
Hash function
hash : =key mod size
and linear probing are used to insert the keys
37, 38, 72, 48, 98, 11, 56
into the hash table with indices 0… 6. The order of the keys
in the array are given by
-
Solution
We know Hash = key mod size
0 1 2 3 4 5 6
98 56 37 38 72 11 48
37 mod 7 = 2
38 mod 7 = 3
38 mod 7 = 3
38 mod 7 = 3
38 mod 7 = 3
38 mod 7 = 3
38 mod 7 = 3
What is the postorder traversal of the following tree?
-
Solution
The postorder traversal of given tree is D, E, B, F, C, A.
In evaluating the arithmetic expression 2 * 4 –(5 + 6), using stack to evaluate its equivalent postfix form, which of the following stack configuration is not possible?
Which one of the following is false?
-
Solution
This is aproperty of context free languages
Which of the following are regular sets?
1] \(\left \{ a^{n}b^{2m} \right \}\mid n \geq 0, m \geq 0\)
2] \(\left \{ a^{n}b^{m} \right \}\mid n=m\)
3] \(\left \{ a^{n}b^{m} \right \}\mid n=2^{m}\)
4] \(\left \{ a^{n}b^{m} \right \}\mid n\neq m\)
-
Solution
In 1, a and b are independent. So we can construct a regular set a*(bb)* but for 2, 3 and 4,a and b are dependent or comparison, so in regular set,we cannot compare number of a’s with number of b’s.
If L1 and L2 are CFG and R is a regular set,which one of the language below is not necessarily a CFG?
-
Solution
If L1 and L2 are CFG,then L∩L may or may not be CFG because the context free grammar is not closed under intersection
Let R be a relation, which of the following comments about the relation R is/are correct?
1.R will necessarily have a composite key, if R is in BCNF but not in 4NF.
2.If R is in 3 NF and if every key of R is simple, then R is in BCNF.
3.If n is in BCNF and if R has at least one simple key,then R is in 4 NF.
4.If R is in 3 NF and if its every key is simple, then R is in 5 NF.
-
Solution
L={0n1m2m+n}where,n,m≥0
0’s are pushed into stack, then 1’s are pushed into stack and then 1’s are popped from the stack checking with each arival of 2. After all 1’s popped, number of 2’s remaining are m +n – m = n.So, now number of 0’s = Number of 2’s remaining, i.e., n=n, by popping an 0 for every 2 and checking that at end of input, stack is empty. So, L is a context free language and a context free language is recognized by PDA (Push Down Automata).