NET JUNE 2015 PAPER-2 SOLVED PART-4


Pages: 1 2 3 4 5


  1. Match the following:

List – I List – II

(a) Forward Reference Table (i) Assembler directive

(b) Mnemonic Table (ii) Uses array data structure

(c) Segment Register Table (iii) Contains machine OP code

(d) EQU (iv) Uses linked list data structure

Codes:

(a) (b) (c) (d)

(A) (ii) (iii) (iv) (i)

(B) (iii) (iv) (ii) (i)

(C) (iv) (i) (iii) (ii)

(D) (iv) (iii) (ii) (i)

Answer: D


  1. The translator which performs macro calls expansion is called :

(A) Macro processor (B) Micro pre-processor

(C) Macro pre-processor (D) Dynamic linker

Answer: C


  1. If all the production rules have single non – terminal symbol on the left side, the grammar defined is :

(A) context free grammar (B) context sensitive grammar

(C) unrestricted grammar (D) phrase grammar

Answer: A


  1. Which one from the following is false ?

(A) LALR parser is Bottom – Up parser

(B) A parsing algorithm which performs a left to right scanning and a right most deviation is RL (1).

(C) LR parser is Bottom – Up parser.

(D) In LL(1), the 1 indicates that there is a one – symbol look – ahead.

Answer: B


  1. Which phase of compiler generates stream of atoms ?

(A) Syntax analysis (B) Lexical Analysis

(C) Code generation (D) Code optimization

Answer: A


  1. A disk drive has 100 cylinders, numbered 0 to 99. Disk requests come to the disk driver for cyclinders 12, 26, 24, 4, 42, 8 and 50 in that order. The driver is currently serving a request at cyclinder 24. A seek takes 6 msec per cyclinder moved. How much seek time is needed for shortest seek time first (SSTF) algorithm?

(A) 0.984 sec (B) 0.396 sec

(C) 0.738 sec (D) 0.42 sec

Answer: D

Explanation.

current position of head is at cylinder 24.
24->26->12->8->4->42->50.
total cylinders traversed are.(2+14+4+4+38+8)=70 cylinders.
1 cylinders is traversed in 6 ms.
70 cylinders are traveresed in 420ms.= 420s/1000=0.42sec


  1. Let Pi and Pj be two processes, R be the set of variables read from memory, and W be the set of variables written to memory. For the concurrent execution of two processes Pi and Pj, which of the following conditions is not true?

(A) R(Pi)∩W(Pj)=Φ (B) W(Pi)∩R(Pj)=Φ

(C) R(Pi)∩R(Pj)=Φ (D) W(Pi)∩W(Pj)=Φ

Answer: C


  1. A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103 if the four frames are initially empty?

(A) 6 (B) 7

(C) 5 (D) 8

Answer: B

Explanation.
LRU-
Whenever a page is used it is stamped with a counter value. When a page is to be replaced page with lowest stamp value is selected as the victim.

0172 3 2 7 1 0 3.

0(1 page fault,Counter=1),1(2 page fault,Counter=2),7(3 page fault,Counter=3),2 (4 page fault,Counter=4).
0 is selected as the victim .and replaced by.3. now frame is.

3(5 page fault,counter=5),1(2 page fault,Counter=2),7(3 page fault,Counter=3),2 (4 page fault,Counter=4)
2 is already in the frame so counter is increased.

3(5 page fault,counter=5),1(2 page fault,Counter=2),7(3 page fault,Counter=3),2 (4 page fault,Counter=6)
7 is already in the frame so counter is increased.

3(5 page fault,counter=5),1(2 page fault,Counter=2),7(3 page fault,Counter=7),2 (4 page fault,Counter=6)
1 is already in the frame so counter is increased.

3(5 page fault,counter=5),1(2 page fault,Counter=8),7(3 page fault,Counter=7),2 (4 page fault,Counter=6)
0 is not in the frame so counter 5 is the least so 3 is replaced by 0.and page fault is increased.

0(6 page fault,counter=9),1(2 page fault,Counter=8),7(3 page fault,Counter=7),2 (4 page fault,Counter=6)
3 replaces 2

0(6 page fault,counter=9),1(2 page fault,Counter=8),7(3 page fault,Counter=7),3 (7 page fault,Counter=10)


  1. What does the following command do?

grep −vn “abc” x

(A) It will print all of the lines in the file x that match the search string “abc”

(B) It will print all of the lines in file x that do not match the search string “abc”

(C) It will print total number of lines in the file x that match the search string “abc”

(D) It will print the specific line numbers of the file x in which there is a match for string “abc”

Answer: A


  1. The Unix Kernel maintains two key data structures related to processes, the process table and the user structure. Which of following information is not the part of user structure?

(A) File descriptor table (B) System call state

(C) Scheduling parameters (D) Kernel stack

Answer: C


Pages: 1 2 3 4 5


Leave a comment