Operating system

To match your answers, scroll down to the end of the page.
1. The _____ table contains the base address of each page in physical memory.
a) process
b) memory
c) page
d) frame

2. Process is
a) program in High level language kept on disk
b) contents of main memory
c) A program in execution
d) A job in secondary memory

3. The circular wait condition can be prevented by
a) defining a linear ordering of resource types
b) using thread
c) using pipes
d) all of the mentioned

4. A problem encountered in multitasking when a process is perpetually denied necessary resources is called
a) deadlock
b) starvation
c) inversion
d) aging

5) The time taken to move the disk arm to the desired cylinder is called the :
a) positioning time
b) random access time
c) seek time
d) rotational latency

6) The time taken for the desired sector to rotate to the disk head is called :
a) positioning time
b) random access time
c) seek time
d) rotational latency

7) In _______ information is recorded magnetically on platters.
a) magnetic disks
b) electrical disks
c) assemblies
d) cylinders

8)SSTF algorithm, like SJF __________ of some requests.
a) may cause starvation
b) will cause starvation
c) does not cause starvation
d) causes aging

9)What is Trojan horse ?
a) It is a useful way to encrypt password
b) It is a user which steals valuable information
c) It is a rogue program which tricks users
d) It’s a brute force attack algorithm

10)In the ______ algorithm, the disk arm starts at one end of the disk and moves toward the other end, servicing requests till the other end of the disk. At the other end, the direction is reversed and servicing continues.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK

11)A process executes the following code.
for (i = 0; i < n; i++)
fork();
The total number of child processes created is:
a) n
b) 2^n – 1
c) 2^n
d) 2^(n+1) – 1;

12) Consider the following piece of code.
#include
#include
int main()
{
fork();
fork();
fork();
printf(“hello\n”);
return 0;
}
How many times “hello” will be printed?
a)16
b)8
c)3
d)9

13) Consider the below piece of code.
#include
#include
#include
void forkexample()
{
int x = 1;
if (fork() == 0)
printf(“Child has x = %d\n”, ++x);
else
printf(“Parent has x = %d\n”, –x);
}
int main()
{ forkexample();
return 0;}
The o/p will be:
a)Parent has x = 0, Child has x = 2
b)Child has x = 2, Parent has x = 0
c)Child has x = 2, Parent has x = 1, Parent has x = 0
d)segmentation fault

14)Which of the following page replacement algorithms suffers from Belady’s anomaly?
a) FIFO
b) LRU
c) Optimal Page Replacement
d) Both LRU and FIFO

15)If the wait for graph contains a cycle :
a) then a deadlock does not exist
b) then a deadlock exists
c) then the system is in a safe state
d) either deadlock exists or system is in a safe state

 

 

 

Answers: 1.b) 2.c) 3.a) 4.b) 5.c) 6.d) 7.a) 8.a) 9.c) 10.b) 11.b) 12.b) 13.b) 14.a) 15.d)