0

Operating System

Description: This test is based on Operating system concepts
Number of Questions: 15
Created by:
Tags: operating system test Operating Systems with Case Study of Unix
Attempted 0/15 Correct 0 Score 0

Which of the following controls degree of multiprogramming?

  1. Short term scheduler

  2. Long term scheduler

  3. Medium term scheduler

  4. All of the above

  5. Both long and medium term scheduler


Correct Option: B
Explanation:

Long term scheduler controls by seeing whether new processes should be send for execution, if current processes have terminated.

In a real time operating system which of the following is the most suitable scheduling scheme?

  1. Round robin

  2. FIFO

  3. Random scheduling

  4. Preemptive

  5. All of the above


Correct Option: D
Explanation:

In a real time operating system there is a boundation to complete the task at a given time, so most suitable is preemptive 

Consider following code

wait (s) : while not (s > 0) do keep testing s : s - 1 Signal(s) : s = s + 1 if value of s is - 2. And a process P executes first instruction, then which of the following is true?

  1. P will be granted to enter critical state

  2. P will not be able to enter critical state and terminate

  3. P will execute first instruction and terminate

  4. P will keep testing until variable s becomes greater than zero

  5. None of the above


Correct Option: D
Explanation:

Here as we know, semaphore variable has value 1 and 0 so if s gets 1 then P has permitted it to enter into critical region.

Which of the following algorithm is best suited for dealing with live lock?

  1. FIFO

  2. Priority Based pre-emption scheduling algorithm

  3. Shortest Job first

  4. Both Shortest job and priority algorithm

  5. None of the above


Correct Option: A
Explanation:

Busy - Wait semaphore definition does not impose any ordering among waiting process, thus there is possibility that a process may be locked out due to contention with others. This process is known as live lock, thus FIFO keeps process in queue and hence no process gets starved.

Which of the following is based on pessimistic concurrency control?

  1. Disable/Enable

  2. Compare and Swap Instruction

  3. Test and Set Instruction

  4. Both Disable/Enable and Compare and Swap instruction

  5. None of the above


Correct Option: A
Explanation:

Block everything that could possibly interfere so that nothing will interfere and this is known as pessimistic approach.

How many child processes are created if two fork () system calls are called?

  1. 4

  2. 3

  3. 5

  4. 2

  5. 1


Correct Option: B
Explanation:

No of child process are (2^n -1), here n is equal to no. of fork () system calls. So, 2^2 - 1 = 4 - 1 = 3 After a new process is created both child and parent processes will execute instruction following fork () system call.

In a multilevel queue scheduling round robin is used with _______?

  1. high priority queue

  2. medium priority queue

  3. low priority queue

  4. none of the above

  5. high as well as low priority queue


Correct Option: B
Explanation:

Used with interactive processes.

Which of the following causes internal fragmentation?

  1. Static allocation of memory

  2. Dynamic allocation of memory

  3. Both static and dynamic allocation of memory

  4. None of the above

  5. Sometimes static and some times dyanimic memory


Correct Option: A
Explanation:

When partition is static memory is wasted in each partition where an object of smaller size than the partition itself is loaded and is known as internal fragmentation.

Minimum number of processes required for dead lock?

  1. 1

  2. 0

  3. 3

  4. 2

  5. 5


Correct Option: D
Explanation:

Number of processes should be at least two.

Which of the following is best suited for mutual exclusion?

  1. Algorithm 1

  2. Algorithm 2

  3. Semaphores

  4. Algorithm 3

  5. None of the above


Correct Option: C
Explanation:

These are powerful mechanism for mutual exclusion.

When a process is removed from processor by medium term scheduler, then it is put back into _______, after it gets required resources?

  1. ready queue

  2. wait queue

  3. suspension

  4. none of the above

  5. non removable processes


Correct Option: A
Explanation:

Medium term scheduler puts it in ready queue.

Interprocess synchronization and communication is used because of which of the following?

  1. To prevent system Integrity

  2. To make efficient multiprocessing

  3. To prevent system integrity and efficient multiprocessing

  4. None of the above

  5. Interprocess synchronization and communication is not used in operating system


Correct Option: C
Explanation:

When we keep care we will get better and get true results because of interprocess synchronization and communication.

Three jobs are executed on a single processor system, it arrives at 0 time in order of p, q, r. Their CPU burst time required is 4, 1, 3 times. What is the completion time of jobs under round robin scheduling with time slice of 1 unit?

  1. 8

  2. 7

  3. 4

  4. 3

  5. 5


Correct Option: A
Explanation:

Here, p will take 1 unit then q will take 1 unit and gets completed then r will take 1 and then again p 1 and r  1 and then p 1 and then r 1 unit and gets completed again p will take 1 and hence, completely execute and total equals eight slice.

Which of the following is suitable for inter process synchronization and abstraction?

  1. Semaphores

  2. Monitors

  3. Both semaphores and monitors

  4. None of the above

  5. Sometimes semaphores and sometimes monitors


Correct Option: B
Explanation:

Monitors support both mutual exclusion data abstraction.

The main problem with Busy - Wait semaphore definition is?

  1. Indefinite postponement

  2. Live Lock

  3. Both Live Lock and Indefinite postponement

  4. Not any problem

  5. None of the above


Correct Option: C
Explanation:

Busy- Wait semaphore definition does not impose any ordering among waiting process, thus there is a possibility that a process may be locked out due to contention with others.

- Hide questions