You are on page 1of 9

Assignment 1

1. Why are distributed systems desirable?

2. What is multiprogramming? What are its advantages over uniprogramming? How is it


different from multiprocessing?

3. What is the difference between system software and application software?

4. Which of the following instructions should be privileged?

a) disable all interrupts

b) read the time-of-day clock

c) set the time-of-day clock

d) read the timer

e) set the value of the timer

f) clear memory

g) switch from user mode to privileged mode

5. What is spooling and what is the use of it in Batch operating systems.

Assignment 2

1. How do "kernel mode" (or "supervisor mode") and "user mode" instructions differ?

2. Give the name of four services provided by an operating system.

3. What is the main purpose of a system call and a system program?

4. Explain the need to separate the command interpreter from the kernel.

5. What is kernel? Describe various operations performed by a kernel.


Assignment3

1. What is the difficulty that a programmer must overcome in writing an operating


system for a real time environment?
2. Discuss the difference between preemptive and nonpremptive scheduling. State
why strict nonpreemptive scheduling is unlikely to be used in a computer centre.
3. What resources are used when a thread is created. How do they differ from those
used when a process is created?
4. Is it possible to have a deadlock involving only one single process. Explain your
answer.
5. When virtual memory is implemented in a computer system, there are certain
costs associated with the technique, and certain benefits. List the cost and
benefits. Is it possible for the costs to increase the benefits? If it is, what measures
can be taken to ensure that this does not happen.
Assignment 4

1. What is process Synchronization?


2. Define Race condition and describe methods to prevent race condition.
3. What is the role of critical section in process synchronization.
4. Specify the hardware support necessary for memory protection, and explain
briefly how it works.
5. State the correctness criteria for the producer-consumer problem.
6. Write down a solution of the Producer-Consumer problem using monitor. Let N
be the buffer size.
Assignment 5

1. What are CPU schedulers? Describe various types of schedulers.


2. What are the objectives of CPU scheduling? Also explain the scheduling criteria.\
3. Describe FCFS scheduling algorithm with suitable example.
4. Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:
Process Burst Time Priority
P1 10 3
P2 2 1
P3 4 3
P4 5 4
P5 1 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 illustrating the execution of these processes using FCFS,
SJF, a non-preemptive priority (a smaller priority number implies a higher priority),
and RR(quantum = 1) scheduling.
b). What is the turn around time of each process for each of the scheduling
algorithms in part (a)?
c). what is the waiting time of each process for each of the scheduling algorithms in
part (a)?
d). Explain the evaluation of each algorithm.

5. Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:
Process Burst Time
P1 20
P2 7
P3 4

Calculate the average waiting time if the processes arrived in the following order:
a) P1, P2, P3 b) P2, P3, P1 c) P3,P1, P2
Assignment 6

1. What is Deadlock? Discuss four necessary conditions for the occurrence of


deadlock.
2. List three examples of deadlocks which are not related with the computer system
environment.
3. Is it possible to have a deadlock involving only one process? Explain your
answer.
4. Compare and contrast deadlock prevention and deadlock avoidance.
5. Consider a system consisting four resources of same type that are shared by three
jobs, each of which needs at most two resources. Show that the system is in safe.
6. Describe the Banker’s algorithm for Deadlock avoidance.
7. Consider the following snapshot of a system
Process Allocation Max
P0 0 0 1 2 0 0 1 2
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6
Is the system in safe state? If the request from process P1 arrives (0,4,2,0) can be
request immediately granted?.
8. Consider the following snapshot of a system
Process Allocation Max Available
P1 2 2 3 3 6 8 7 7 10
P2 2 0 3 4 3 3
P3 1 2 4 3 4 4
Is the system in safe state? Find the safe sequence.
9. Consider a system with five processes and three resources type A,B,C. A has 10
instances, B has five and C has 7 instances. Suppose at time t the following
snapshot of system has been taken:
Process Allocation Max Available
P1 0 1 0 7 5 3 3 3 2
P2 2 0 0 3 2 2
P3 3 0 2 9 0 2
P4 2 1 1 2 2 2
P5 0 0 2 4 3 3
a) What will be the content of need matrix?
b) Is the system in safe state?Find the safe sequence.
10. Define safe state and safe sequence.
Assignment 7

1. Explain the difference between internal and external fragmentation.


2. How protection is ensured in paging scheme.
3. When virtual memory is implemented in a computing system, there are certain
costs associated with the technique, and certain benefits. List the costs and
benefits. Is it possible for the costs to exceed the benefits? If it is, what measures
can be taken to ensure that this does not happen?
4. Develop algorithms nearer to C-syntax for any two encryption/decryption
algorithms.
5. Discuss the similarities and differences between the basic strategies for non-
contiguous allocation of disk space.

Tutorial 1

1. Write down the major difference between following types of operating systems:

1). Batch system

2) Real time System

3) Time-sharing system

2. Give four major functions of an operating system.

3. Whether an operating system is essential for a computer system. Explain why?

4. What is an operating system? How does an operating system take control over a
computer system?

5. Compare and contrast the following types operating systems:

a) Interactive b) Network c) Distributed.

Tutorial 2

1. Explain the difference between Micro-kernel and Macro-kernel architecture.


2. List down various utility programs run on a personel computer system.

3. What are virtual machines? List their advantages and disadvantages.

4. How security and protection services managed by an operating system.

5. What is the role of “supervisor call” in the design of operating systems?

Tutorial 3

1. Discuss the features of windows Vista operating system.


2. What is process? How it is different from a program?
3. Discuss in detail the features, security and protection mechanism in Linux
Operating System.
4. State the differences between threads and processes.
5. What is threading? What are the advantages of multithreading?

Tutorial 4

1.Write down the solution of the Readers-Writers problem using 3 semaphores.


2.Synchronization has two parts: mutual exclusion and scheduling. Discuss how
they are provided in monitors.
3.Draw the state transision diagram of a process and indicate which transition can
be incurred by wait and signal operations of a monitor.
4.In the semaphore solution of readers/writers, can OKToWrite ever get greater
than 1? What about OKToRead? Explain how it can (or cannot) happen.
5.In the monitor solution of readers/writers, is FIFO order guaranteed for Writers
(i.e., the first writer who calls checkWrite will go into the database before
other writers who call checkWrite later)?
6.Regarding the monitor solution of readers/writers, if the first writer (P1) is
inside the doneWrite procedure when the second writer (P2) arrives to the
system, how far can it go within the checkWrite procedure?

Tutorial 5

1. Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:
Process Burst Time Arrival Time
P1 10 0
P2 2 1
P3 4 2
P4 5 3

Calculate the average waiting time in:


a) Preemptive SJF scheduling b) non-preemptive SJF scheduling

2. Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:

Process Burst Time Priority


P1 10 3
P2 1 1
P3 2 4
P4 1 5
P5 5 2

The processes are assumed to have arrived in the order P1,P2, P3, P4, P5 all at time 0.
Using priority scheduling, calculate average waiting time.

3. Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:

Process Burst Time Priority Arrival Time


P1 10 3 0
P2 2 2 1
P3 4 1 2

Calculate average waiting time.

4. What is the usage of time quantum in Round-Robin scheduling? Describe with a


suitable example.

5.Explain multilevel queue scheduling in brief.