You are on page 1of 4

Assignment 5 – Operating System Fundamentals

1)

A process can be ___________


a) single threaded
b) multithreaded
c) both single threaded and multithreaded
d) none of the mentioned

Ans) c)

2)

According to Amdahl’s Law if the program is 100% serial with infinite number of
cores what will be the speedup?
a)1
b) 0
c)1.3
d)1.4

Ans) a)

Explanation:
Speedup<= 1/(S +((1+S)/N)) , where S=1 and N is infinity therefore 1/1 = 1
So, option a is true.

3)

Multithreading on a multi – CPU machine ___________


a) decreases concurrency
b) increases concurrency
c) doesn’t affect the concurrency
d) can increase or decrease the concurrency

Ans) b)
4)

Which of the following components of program state are shared across threads in a
multithreaded process?
a) Register values
b) Global variables
c) Heap memory
d) Both b and c

Ans) d.

Explanation: The threads of a multithreaded process share heap memory and


global variables. Each thread has separate set of register and a separate stack.

5)

Determine the average waiting time for the following set of processes scheduled
using FCFS policy. Assume the processes arrived in the order P1,P2,P3,P4,P5.

Process Burst Time


P1 5
P2 15
P3 20
P4 40
P5 5

a) 3
b) 29
c) 145
d) 5

Ans) b) 29
Explanation:

5 + ( 15 + 5 ) + ( 5 + 15 + 20 ) + ( 5 + 15 + 20 + 40 ) / 5
=145/5
=2
6)

If degree of multiprogramming is low, then which statement is correct?

a) Then turnaround time and CPU utilization will be low


b) Then waiting time will be high
c) Then the turnaround time will be high
d) None of the above options

Ans) a)

Explanation:
Due to low degree of multiprogramming, the turnaround time and the CPU utilization
will be low .

7)

Which algorithm is defined in Time quantum?


a) shortest job scheduling algorithm
b) round robin scheduling algorithm
c) priority scheduling algorithm
d) none of the options

Ans) b)

8)

The interval from the time of submission of a process to the time of completion is
termed as?
a) waiting time
b) turnaround time
c) response time
d) throughput

Ans) b)
9)

What is FIFO algorithm?


a) first executes the job that came in last in the queue
b) first executes the job that came in first in the queue
c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs

Ans). b)

10)

Which of the following is not shared by threads?


a) program counter
b) stack
c) both program counter and stack
d) none

Ans) c.

11)

If a program has 70% serial code, so with 5 processor system instead 1, what will
the speedup?
a) 1.31
b) 1.91
c) 1
d) 1.71

Ans) a)

Explanation:
S=0.70
N=5
Speedup<= 1 / (S +((1 + S) / N))

= 1/(0.70+((1+0.70)/5))
= 1.31

You might also like