Showing posts with label fifo. Show all posts
Showing posts with label fifo. Show all posts

Tuesday, September 15, 2020

Operating System MCQ

 Q.1 The “blocking factor” of a file is

(A) The number of blocks accessible to a file

(B) The number of blocks allocated to a file

(C) The number of logical records in one physical record

(D) None of the above

Ans: (C)


Q.2 Which of these is a component of a process precedence sequence?

(A) Process name 

(B) Sequence operator ‘;’

(C) Concurrency operator ‘,’ 

(D) All of the above

Ans: (D)


Q.3 Which amongst the following is valid syntax of the Fork and Join Primitive?

(A) Fork <label> 

(B) Fork <label>Join <var> Join <label>

(C) For <var> 

(D) Fork <var>Join <var> join <var>

Ans: (A)


Q.4 Nested Macro calls are expanded using the

(A) FIFO rule (First in first out) 

(B) LIFO (Last in First out)

(C) FILO rule (First in last out) 

(D) None of the above

Ans: (B)


Q.5 A parser which is a variant of top-down parsing without backtracking is

(A) Recursive Descend. 

(B) Operator Precedence.

(C) LL(1) parser. 

(D) LALR Parser.

Ans: (A)


Q.6 The expansion of nested macro calls follows

(A) FIFO rule. 

(B) LIFO rule.

(C) LILO rule. 

(D) priority rule.

Ans: (B)


Q.7 In a two-pass assembler, the task of the Pass II is to

(A) separate the symbol, mnemonic opcode and operand fields.

(B) build the symbol table.

(C) construct intermediate code.

(D) synthesize the target program.

Ans: (D)


Q.8 A linker program

(A) places the program in the memory for the purpose of execution.

(B) relocates the program to execute from the specific memory area allocated to it.

(C) links the program with other programs needed for its execution.

(D) interfaces the program with the entities generating its input data.

Ans: (C)


Q.9 Which scheduling policy is most suitable for a time-shared operating system

(A) Shortest-job First. 

(B) Elevator.

(C) Round-Robin. 

(D) First-Come-First-Serve.

Ans: (C)


Q.10 A critical section is a program segment

(A) which should run in a certain specified amount of time.

(B) which avoids deadlocks.

(C) where shared resources are accessed.

(D) which must be enclosed by a pair of semaphore operations, P and V.

Ans: (C)


Q.11 An operating system contains 3 user processes each requiring 2 units of resource

R .The minimum number of units of R such that no deadlocks will ever arise is

(A) 4. 

(B) 3.

(C) 5. 

(D) 6.

Ans: (A)


Q.12 Locality of reference implies that the page reference being made by a process

(A) will always be to the page used in the previous page reference.

(B) is likely to be the one of the pages used in the last few page references.

(C) will always be to one of the pages existing in memory.

(D)will always lead to a page fault.

Ans: (B)


Q.13 Which of these is not a part of Synthesis phase

(A) Obtain machine code corresponding to the mnemonic from the Mnemonics table

(B) Obtain address of a memory operand from the symbol table

(C) Perform LC processing

(D) Synthesize a machine instruction or the machine form of a constant

Ans: (C)


Q.14 The syntax of the assembler directive EQU is

(A) EQU <address space> 

(B) <symbol>EQU<address space>

(C) <symbol>EQU 

(D) None of the above

Ans: (B)


Q.15 The following features are needed to implement top down parsing

(A) Source string marker

(B) Prediction making mechanism

(C) Matching and Backtracking mechanism

(D) All of the above

Ans: (D)


Q.16 A macro definition consists of

(A) A macro prototype statement 

(B) One or more model statements

(C) Macro pre-processor statements 

(D) All of the above

Ans: (D)


Q.17 The main reason to encrypt a file is to ______________.

(A) Reduce its size 

(B) Secure it for transmission

(C) Prepare it for backup 

(D) Include it in the start-up sequence

Ans: (B)


Q.18 Which of the following is not a key piece of information, stored in single page table entry, assuming pure paging and virtual memory

(A) Frame number

(B) A bit indicating whether the page is in physical memory or on the disk

(C) A reference for the disk block that stores the page

(D) None of the above

Ans: (C)


Q.19 A UNIX device driver is

(A) Structured into two halves called top half and bottom half

(B) Three equal partitions

(C) Unstructured

(D) None of the above

Ans: (A)


Q.20 The following is not a layer of IO management module

(A) PIOCS (Physical Input Output Control System)

(B) LIOCS (Logical Input Output Control System)

(C) FS (File System)

(D) MCS (Management Control System)

Ans: (D)


Q.21 Which amongst the following is not a valid page replacement policy?

(A) LRU policy (Least Recently Used)

(B) FIFO policy (First in first out)

(C) RU policy (Recurrently used)

(D) Optimal page replacement policy

Ans: (C)


Q.22 Consider a program with a linked origin of 5000. Let the memory area allocated to it have the start address of 70000. Which amongst the following will be the value to be loaded in relocation register?

(A) 20000 

(B) 50000

(C) 70000 

(D) 90000

Ans: (None of the above choice in correct. )


Q.23 An assembly language is a

(A) low level programming language

(B) Middle level programming language

(C) High level programming language

(D) Internet based programming language

Ans: (A)


Q.24 TII stands for

(A) Table of incomplete instructions

(B) table of information instructions

(C) translation of instructions information

(D) translation of information instruction

Ans: (A)


Q.25 An analysis, which determines the syntactic structure of the source statement, is called

(A) Sementic analysis 

(B) process analysis

(C) Syntax analysis 

(D) function analysis

Ans: (C)


Q.26 Action implementing instruction’s meaning are a actually carried out by

(A) Instruction fetch

(B) Instruction decode

(C) instruction execution

(D) Instruction program

Ans: (C)

Friday, May 12, 2017

Data structure in C with answers

Q.1 which of the fallowing reflects the correct definition of recursion?
            a) Calling of a function by some other function                         b) Calling of a function by main() function.
            c) Calling of a function by itself                                                   d) None of the above.

Q.2 which of the fallowing reflects the correct meaning of Dynamic memory allocation (DMA)?
            a) Memory allocation at Run time                                                b) Memory allocation at Compile time
            c) Memory allocation at Load time                                              d) None of the above

Q.3 which of the fallowing function is not used for dynamic memory allocation or de-allocation in C?
            a) malloc()                                                                                      b) calloc()
            c) free()                                                                                           d)getch()

Q.4 let us assume that List is a pointer pointing to the first node of singly linked list, and next is a pointer pointing to the next node of linked list then after the execution of the while loop given below List contains
While(List->next!=NULL)
List=List->next;
a)      List contains the address of first node of linked list       b) List contains the address of second last node linked list.
b)      List contains the address of second node linked list       d) List contains the address of last node of linked list.

Q.5 which of the following condition reflects that the Is full condition in Circular Queue where rear ,front and size are variable with their usual meaning in Circular queue
            a) if(front==(rear+1)mod size);                                                  b) if(rear==(front+1)mod size);
            c) if(rear==front);                                                                        d) if(rear==-1 && front==-1);

Q.6 Stack fallows which of the fallowing principle?
            a) FIFO                                                                                          b) LIFO
            c) Both a) and  b)                                                                          d) none of the above

Q.7 which of the fallowing condition reflects that the Is Empty condition in linear Queue where rear ,front and size are variable with their usual meaning in linear queue
            a) if(front==rear);                                                                           b) if(front!=rear);
            c) if(front+1==rear-1)                                                                     d) none of the above

Q.8 Queue fallows which of the following principle?
            a) FIFO                                                                                             b) LIFO
            c) Both a) and  b)                                                                             d) none of the above

Common data for question 9 & 10. A binary tree is given below:


Q.9 height of the binary tree is?
            a) 2                                                                                                      b) 3
            c) 4                                                                                                      d) 5

Q.10 number of leaf and non-leaf node in the binary tree respectively  is?
a) 4, 6                                                                                                 b) 6, 4

c) 5, 5                                                                                                 d)none of the above is correct

Search Aptipedia