MCS-041
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.
Question 2:
(a) List the conditions under which memory allocation decisions can delay the initiation or scheduling of a program.
(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).
(c) Explain the trade-offs involved in choosing the size of a time slice for a round
robin algorithm.
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 disk has 200 tracks and the requested tracks, in the order received, are 65, 48, 39, 08, 99, 164, 152, 38, 124.
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.
(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.
- Write a C / C++ program to coordinate the barber and the customers, using semaphores.
- 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.
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).
No comments:
Post a Comment