Questions 61–65 of 65. Imported answers require independent review unless marked reviewed.

Topic practice 65 questionsPage 7 of 7

Question 61

Open question
CSNAT2 marksNeeds review
A processor X₁ operating at 2 GHz has a standard 5-stage RISC instruction pipeline having a base CPI (cycles per instruction) of one without any pipeline hazards. For a given program P that has 30% branch instructions, control hazards incur 2 cycles stall for every branch. A new version of the processor X₂ operating at same clock frequency has an additional branch predictor unit (BPU) that completely eliminates stalls for correctly predicted branches. There is neither any savings nor any additional stalls for wrong predictions. There are no structural hazards and data hazards for X₁ and X₂. If the BPU has a prediction accuracy of 80%, the speed up (rounded off to two decimal places) obtained by X₂ over X₁ in executing P is __________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 62

Open question
CSNAT2 marksNeeds review
Consider the queues

containing four elements and

containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are Enqueue (Q, element) and Dequeue (Q). The minimum number of Enqueue operations on

required to place the elements of

in

in reverse order (shown as the Final State in the figure) without using any additional storage is __________.
Diagram for Computer Science and Information Technology question 62


Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 63

Open question
CSNAT2 marksNeeds review
Consider two file systems

and

, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in A and also in B. Now, consider inserting a new block in the middle of the file between the 50ᵗʰ and 51ˢᵗ block, whose data is already available in the memory. Assume that there are enough free blocks at the end of the file and that the file control blocks are already in memory. Let the number of disk accesses required to insert a block in the middle of the file in

and

are

and

, respectively, then the value of

is __________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 64

Open question
CSNAT2 marksNeeds review
Consider a demand paging system with four page frames (initially empty) and LRU page replacement policy. For the following page reference string
7, 2, 7, 3, 2, 5, 3, 4, 6, 7, 1, 5, 6, 1
the page fault rate, defined as the ratio of number of page faults to the number of memory accesses (rounded off to one decimal place) is __________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 65

Open question
CSNAT2 marksNeeds review
Consider the following grammar along with translation rules.





Here # and % are operators and

is a token that represents an integer and

represents the corresponding integer value. The set of non-terminals is

and a subscripted non-terminal indicates an instance of the non-terminal.
Using this translation scheme, the computed value of

for root of the parse tree for the expression

is __________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer