Introduction to Operating Systems Nptel Week 5 Answers

Are you looking for Introduction to Operating Systems Nptel Week 5 Answers? You’ve come to the right place! Access the latest and most accurate solutions for your Week 5 assignment in the Introduction to Operating Systems course.

Course Link: Click Here


These are Introduction to Operating Systems Nptel Week 5 Answers
Introduction to Operating Systems Nptel Week 5 Answers

Introduction to Operating Systems Nptel Week 5 Answers (July-Dec 2024)


1. State True/False:

I. I/O bound processes have the lower scheduling priority compared to CPU bound processes as they are dependent on I/Os
II. A process can behave as both CPU and I/O bound processes.

a) I – True , II – False
b) I – False , II – False
c) I – False , II – True
d) I – True , II – True

Answer: c) I – False , II – True


2. Average Waiting Time and Average Response Time are independent of the sequence in which the processes are executed in a first come first serve scheduling algorithm.

a) True
b) False

Answer: a) True


3. Match the following:

I. FCFS      i. Optimal Waiting Time
II. SJF      ii. Convoy effect
III. Round Robin      iii. Not practical
IV. SRTF      iv. No Starvation

a) I – ii, II – i, III – iv, IV – iii
b) I – i, II – ii, III – iv, IV – iii
c) I – iii, II – i, III – iv, IV – ii
d) I – iii, II – iv, III – i, IV – i

Answer: a) I – ii, II – i, III – iv, IV – iii


4. State True/False:

I. For the processes to be seen as concurrent the time slice should be as high as possible
II. xv6 scheduling policy is the best in terms of prioritizing processes

a) I – True II – False
b) I – True II – True
c) I – False II – False
d) I – False II – True

Answer: c) I – False II – False


5. Ageing is a solution for starvation in priority scheduling

a) True
b) False

Answer: a) True


6. Processes like MS Excel which can be both CPU bound and I/O bound are the best for Multi-level Queues

a) True
b) False

Answer: a) True


7. 4 processes A,B,C,D have estimated burst times of 4,5,6,7 ns respectively. They are scheduled in round robin fashion and the time slice is of 2 ns. The processes A,B,C,D arrive at the 0,0.5,1,1.5 ns respectively. How long would it take for all processes to complete?

Answer: 22


8. 4 processes A,B,C,D have estimated burst times of 4,5,6,7 ns respectively. They are scheduled in round robin fashion and the time slice is of 2 ns. The processes A,B,C,D arrive at the 0,0.5,1,1.5 ns respectively. At what time will process B finish?

Answer: 17


9. 4 processes A,B,C,D have estimated burst times of 4,5,6,7 ns respectively. They are scheduled in round robin fashion and the time slice is of 2 ns. The processes A,B,C,D arrive at the 0,0.5,1,1.5 ns respectively. The order in which the processes are completed.

See also  Introduction to Operating Systems Nptel Week 7 Answers

a) B,A,C,D
b) D,A,B,C
c) A,B,D,C
d) A,B,C,D

Answer: d) A,B,C,D


10. If FCFS is used in the place of round robin scheduling in Q9, then the overhead due to context switches will increase.

a) True
b) False

Answer: b) False


All weeks of Introduction to Operating Systems: Click Here

For answers to additional Nptel courses, please refer to this link: NPTEL Assignment Answers


Introduction to Operating Systems Nptel Week 5 Answers (JULY-DEC 2023)

Course Name: Introduction to Operating Systems

Course Link: Click Here

These are Introduction to Operating Systems NPTEL Week 5 Assignment Answers


Q1. The data structure best suitable for implementing Round Robin Scheduling is
Stack
Queue
List
Array

Answer: Queue


Q2. What does Turn around time mean ?
Time from the process enters the ready queue to the time it starts execution.
The difference between the arrival time and the completion time of the process.
Time taken from start to completion of I/O
Time a process waits in the ready queue.

Answer: The difference between the arrival time and the completion time of the process.


Q3. a) O(n) scheduler 1)has 2 run queues to prevent starvation
b) O(1) scheduler 2)Set based on priority of the process
c) Time Slice of a process 3)is based on average sleeping time
d) Dynamic Priority 4) Not scalable to large number of processes
a-3, b-1 c-4, d-2
a-3, b-4,c-1, d-3
a-4, b-1, c-2, d-3
a-4, b-3, c-2, d -1

Answer: a-4, b-1, c-2, d-3


These are Introduction to Operating Systems Nptel Week 5 Answers


Q4. Preemption is
forced deallocation of the CPU from a program which is executing on the CPU.
release of CPU by the program after completing its task.
forced allocation of CPU by a program to itself.
a program terminating itself due to detection of an error.

Answer: forced deallocation of the CPU from a program which is executing on the CPU.


Q5. Which of the following scheduling algorithms is not preemptive?
FCFS
Round robin
SRTF
Ideal Fair scheduling

Answer: FCFS


Q6. State if the following statement is True or False.
A system can have more than one scheduling algorithm at a time

True
False

Answer: True


These are Introduction to Operating Systems NPTEL Week 5 Assignment Answers


Q7. Shortest Remaining Time first algorithm is not practical
a. Its time complexity is huge, which makes it unsuitable for real systems
b. It requires knowledge of the burst time, which is not easy to predict

True,True
True,False
False,True
False,False

Answer: False,True


Q8. What is the Schedule length of the following process.(used FCFS scheduling)
10
16
19
20

Answer: 20


Q9. With respect to the table given above, which of the following is False?
The order of execution is same in FCFS and SRTF
The average waiting time is same for FCFS and SJF
The CPU idle time is 2 units
None of these

See also  Programming in Modern C++ Week 5 Assignment Answers

Answer: None of these


These are Introduction to Operating Systems Nptel Week 5 Answers


Q10. Consider a set of process A, B, C, D arriving in the same order at time zero in the ready queue. Their burst times are 4, 1, 8, 1 respectively. Using Round Robin scheduling, with time slice of 1 unit. What is the time at which process A completes execution?
4
5
9
12

Answer: 9


Q11. Consider three process P1, P2, and P3 with arrival time (0, 1, 3) and burst time (6 ,5,4) respectively, what is the order of completion in SJF and RR scheduling with time slice of 2 units
SJF: P1 P3 P2 RR: P1 P2 P3
SJF: P1 P2 P3 RR: P1 P2 P3
SJF: P1 P2 P3 RR: P2 P1 P3
SJF: P1 P3 P2 RR: P1 P3 P2

Answer: SJF:  P1 P3 P2 RR: P1 P3 P2


Q12. Let the base priority of a system be 130 and the nice value provided is -10. What is the time slice that the process gets in the O(1) scheduling algorithm?
100
200
300
400

Answer: 100


These are Introduction to Operating Systems Nptel Week 5 Answers


Q13. Consider 3 Process, arriving at time zero, with total execution time of 40, 50, 60 ms respectively. Each process spends the first 40% of execution time doing I/O operation and the next 60% time for computations. The scheduler uses FCFS scheduling. Assuming that all I/O operations are overlapped. How much time in ms the CPU is idle?
16 ms
24ms
60ms
None of these

Answer: 16ms


Q14. From the data given in Question 13, what is the average turn around time?
32 ms
48 ms
52 ms
72 ms

Answer: 52 ms


Q15. A process is provided with a bonus of 4 in the O(1) scheduling algorithm. The dynamic priority of the process ________.

Answer: 121


These are Introduction to Operating Systems Nptel Week 5 Answers

More Weeks of Introduction to Operating Systems: Click here

More Nptel Courses: Click here


Introduction to Operating Systems Nptel Week 5 Answers (Jan-Apr 2023)

Course Name: Introduction To Operating Systems

Link of course: Click here


Q1)The average turnaround time with the shortest remaining time first (SRTF) and shortest job first (SJF) scheduling for the seven processes listed in the table is ___________
a. 10 and 13.4
b. 12 and 14.5
c. 11 and 13.4
d. 12 and 13.4

Answer: c. 11 and 13.4


Q2) Consider the context switching overhead of 1 unit. What is the context switching overhead while using SRTF and SJF scheduling for the seven processes listed in the table above. Include the context switching to load the first process?
a. 10 and 6
b. 11 and 7
c. 11 and 6
d. 10 and 7

Answer: b. 11 and 7


These are Introduction to Operating Systems Nptel Week 5 Answers

See also  Introduction to Operating Systems Nptel Week 6 Answers

Q3) For the processes listed in the table above, the schedule length is _____________ with a FCFS scheduling scheme

Answer: 29


Consider 3 processes that start simultaneously. Each process from start to finish takes 40, 50, and 60 ms respectively. Of this, the first 20% of the time is spent waiting for IO events and the next 80% time for computation


These are Introduction to Operating Systems Nptel Week 5 Answers


Q4) The scheduler uses FCFS scheduling. Assuming that all I/O operations are overlapped. How much time in milli-seconds is the CPU idle?
a. 8 ms
b. 16 ms
c. 18 ms
d. 40 ms

Answer: c. 18 ms


These are Introduction to Operating Systems Nptel Week 5 Answers


Q5) From the data given above, which of the following is the average turn around time considering only the time when a process is either running or in the ready queue?
a. 42 ms
b. 62 ms
c. 72 ms
d. 82 ms

Answer: c. 72 ms


Q6) For the data given above, the schedule length is _____________ assuming SRTF scheduling algorithm

Answer: 120


Q7) Shortest Remaining Time first algorithm is not practical
Its time complexity is huge, which makes it unsuitable for real systems
It requires knowledge of the burst time, which can be easily predicted

a. True,True
b. True,False
c. False,True
d. False,False

Answer: b. True,False


These are Introduction to Operating Systems Nptel Week 5 Answers


Consider three process P1, P2, and P3 with arrival time (0, 1, 3) and burst time (6 ,5,4) respectively, what is the order of completion in SJF and RR scheduling with time slice of 2 units

Q8) Order of completion in SJF scheduling
a. SJF: P2 P3 P1
b. SJF: P1 P2 P3
c. SJF: P1 P2 P3
d. SJF: P1 P3 P2

Answer: a. SJF: P2 P3 P1


Q9) Order of Completion in RR scheduling
a. RR: P1 P2 P3
b. RR: P1 P2 P3
c. RR: P2 P1 P3
d. RR: P1 P3 P2

Answer: d. RR: P1 P3 P2


These are Introduction to Operating Systems Nptel Week 5 Answers


Q10) Professor X suggests a method to alleviate starvation in scheduling algorithms. Under the new scheme, processes get a priority number.
The priority of the process is considered by the scheduling algorithm when scheduling. The new scheme will alleviate starvation

a. True
b. False

Answer: a. True


These are Introduction to Operating Systems Nptel Week 5 Answers