0% found this document useful (0 votes)
34 views2 pages

Department of Computer Science and Engineering Assignment No.-1

This document contains questions related to operating systems concepts. It includes questions about system calls, user level vs kernel level threads, CPU scheduling algorithms like FCFS, SJF, priority scheduling and round robin. It also includes questions on page replacement algorithms like LRU, FIFO and optimal and questions on memory allocation algorithms like first fit, best fit and worst fit. It also has a question about race conditions.

Uploaded by

ayush kaul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Department of Computer Science and Engineering Assignment No.-1

This document contains questions related to operating systems concepts. It includes questions about system calls, user level vs kernel level threads, CPU scheduling algorithms like FCFS, SJF, priority scheduling and round robin. It also includes questions on page replacement algorithms like LRU, FIFO and optimal and questions on memory allocation algorithms like first fit, best fit and worst fit. It also has a question about race conditions.

Uploaded by

ayush kaul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MAHARAJA AGRASEN INSTITUTE OF TECHNOLOGY

Department of Computer Science and Engineering


Assignment No.-1.
Subject Name: Operating Systems
Subject Code: CIC-305

Unit 1
1. What is the purpose of system calls and how do system calls relate to the operating system and to the
concept of dual mode (Kernel mode and user mode) operation?(CO1)

2. Differentiate between user level threads and kernel level threads? How does an OS deals with them?
Write an algorithm for any one type of thread as serviced by an OS.(CO1 )
3. Consider the following set of processes with the length of CPU burst given in milliseconds
Process burst time Priority
P1 20 3
P2 5 1
P3 2 3
P4 6 4

P5 8 2

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5 all at time 0.
a) Draw four Gantt Charts that illustrate the execution of these processes using the following
scheduling algorithms:
i) First come first serve
ii) Shortest job first
iii) Non pre-emptive priority (a smaller priority number implies a higher priority).
iv) Round Robin (quantum=2)
b) What is the turn around time of each process for each of the scheduling algorithms in part (i)
c) What is the waiting time of each process for each of the scheduling algorithms in part(i)
d) Which of the algorithm in parts has the minimum average waiting time (over all processes)?(CO1)
4. Consider the following set of processes with the length of CPU burst time given in milliseconds.
Process Name Arrival Time CPU Burst Time
A 0 3
B 1 5
C 3 2
D 9 6
E 12 5

Calculate average waiting time and turnaround time (for each process) for the Round Robin
(quantum=2ms) and SJF (pre-emptive) CPU scheduling. (CO1)
Unit 2
5. If the hit ratio to a TLB is 80%, and it takes 15 nanoseconds to search the TLB, and 150 nanoseconds to
access the main memory, then what must be the effective memory access time in nanoseconds? (CO2)
6. Consider following page reference string 1,2,3,4,21,5,6,2,1,2,3,7,6,3,2,1,2,3,6. How many page faults
would occur for following replacement algorithm (assuming one, two, three frames): (i) LRU (ii) FIFO iii)
Optimal replacement. (CO2)
7. Given memory partitions of 100 KB, 500 KB, 200 KB, 300 KB and 600 KB (in order), how would each
of the first fit, best fit, and worst fit algorithms place processes of 212 KB, 417 KB, 112 KB and 426 KB
(in order)? Which algorithm makes the most efficient use of memory? (CO2)
8. What is a race condition? How can race conditions be avoided? (CO2)

You might also like