Course Code : MCS-041
Course Title : Operating Systems
Assignment Number : MCA(IV)/041/Assignment/2018-19
Maximum Marks : 100
Weightage : 25%
Last Date of Submission : 15th October, 2018 (for July session)
15th April, 2019(for January session)
This assignment has five questions which carries 80 marks. Rest 20 marks are
for viva voce. Answer all the questions. You may use illustrations and diagrams
to enhance the explanation. Please go through the guidelines regarding
assignments given in the Programme Guide.
Question 1:
A time sharing system is to be designed to support a large number of users. List all the
considerations which influence the choice of the time slice. Justify each consideration.
(5 Marks)
Question 2:
(a) List the conditions under which memory allocation decisions can delay the
initiation or scheduling of a program. (6 Marks)
(b) Consider the following set of processes with arrival time and CPU execution
time given in milliseconds. A process with a larger priority number has a
higher priority. If any assumptions made by you, state them.
Process Arrival
Time
Execution
Time
Priority
P1 0 09 1
P2 2 06 2
P3 3 04 3
P4 3 03 4
P5 6 04 5
(i) Draw the Gantt charts illustrating the execution of these processes using the
FCFS, SJF, Round Robin(with quantum = 2).
(ii) Also calculate the average turn around time, average waiting time, processor
utilization and throughput for each of the algorithms mentioned in (i).
(10 Marks)
(c) Explain the trade-offs involved in choosing the size of a time slice for a round
robin algorithm. (4 Marks)
Question 3:
Describe the following disk scheduling policies: First Come First Serve (FCFS),
Shortest Seek Time First, SCAN, C-SCAN, Look and C-Look. Show the disk arm
movement and calculate the number of tracks traversed using all of the policies if the
4
disk has 200 tracks and the requested tracks, in the order received, are 65, 48, 39, 08,
99, 164, 152, 38, 124. (20 Marks)
Question 4:
(a) The Cigarette-Smokers Problem: Consider a system with three smoker
processes and one agent process. Each smoker continuously rolls a cigarette
and then smokes it. But to roll and smoke a cigarette, the smoker needs three
ingredients: tobacco, paper, and matches. One of the smoker processes has
paper, another has tobacco, and the third has matches. The agent has an
infinite supply of all the three materials. The agent places two of the
ingredients on the table. The smoker who has the remaining ingredient then
makes and smokes a cigarette, signaling the agent on completion. The agent
then puts out another two of the three ingredients, and the cycle repeats. Write
an interactive C/C++ program to synchronize the agent and the smokers, using
semaphores. (5 Marks)
(b) The Sleeping Barber Problem: A barbershop consists of a waiting room with
n chairs and the barber room containing the barber chair. If there are no
customers to be served, the barber goes to sleep. If a customer enters the
barbershop and all chairs are occupied, then the customer leaves the shop. If
the barber is busy but chairs are available, then the customer sits in one of the
free chairs. If the barber is asleep, the customer wakes up the barber.
i. Write a C / C++ program to coordinate the barber and the customers, using
semaphores.
ii. Consider the Sleeping-Barber Problem with the modification that there are
k barbers and k barber chairs in the barber room, instead of just one. Write
a program to coordinate the barbers and the customers.
(5×2 = 10Marks)
Question 5:
Discuss in detail the features, Process management, Memory management, I/O
Management, File management and Security and Protection in Android Operating
System (latest version).
Reviews
There are no reviews yet.