You are on page 1of 7

DEPARTMENT OF ELECTRONICS & COMM. ENGG.

B.I.T., MESRA, RANCHI


CP 4107

OPERATING SYSTEMS

Module 1:
Introduction:
What is an Operating System? Simple Monitor, Performance, Multiprogramming, time-sharing,
Real Time systems, Protection.
(5)
File Systems:
File Concept and support, Access and allocation methods, directory systems, File protection.
(3)
Module 2:
CPU Scheduling:
Scheduling concepts and algorithms, Algorithms evaluation, and Multiple processor scheduling.
(6)
Module 3:
Memory Management:
Preliminaries, Bare Machine, Resident Monitor, Swapping, Multiple partitions, Paging,
Segmentation, Combined systems.
(8)
Module 4:
Virtual Memory:
Overlays, Demand paging, Performance of demand paging, Page replacement, Virtual memory
concepts, Page replacement algorithms, Allocation algorithms, and Thrashing.
(8)
Module 5:
Disk Scheduling:
Physical characterization, Disk Management, Swap-Space Management, RAID structure, FCFS
scheduling and Shortest-Seek-Time-First.
(6)
Module 6:
Deadlocks:
The deadlock problem, Deadlock characterization, Deadlock prevention, Deadlock avoidance;
Deadlock detection, Recovery from deadlock, and Combined approach to deadlock handling.
(4)
Module 7:
Process Synchronization:
Semaphors, OS Synchronization, Atomic Transaction.
Security: The Security Problem, User Authentication, Cryptography.

Text Book:
Silver Schatz, A and Golvin, P.B. Operating System Concepts, 5 th Edn. John Wiley, New Yark,
2000
Reference Books :
Deitel H.M., An Introduction to Operating System, Addison Wesley, Inc., London, 1995.
Mandinck S.E., Operating System McGraw Hill., London, 1993.

TUTORIAL
CP 4107

Operating Systems

INTRODUCTION:
1.

Discuss the term resident monitor in detail.

2.

Discuss the different roles of an operating system.

3.

Present the concepts of buffering and spooling. How can you differentiate them?

4.

Define the essential differences between


(a) Batch O.S
(b) Time - Sharing
(c) Real - Time

5.

Explain how buffering is useful for I/O bound and CPU-bound jobs.

6.

Present the concept of multiprogramming. How can you differentiate it from TimeSharing?

OPERATING SYSTEM SERVICES


7.

What are the different types of operating system services? Explain in user view.

8.

What are the methods for invoking OS services?

9.

What are the different methods for passing parameters to an interrupt service routine
from a running program?

FILE SYSTEM
10.

Some system provide file sharing by maintaining a single copy of a file, while others
maintain several copies, one for each of the users sharing the file. Discuss the relative
merits of each approach.

11.

Consider a system that supports the allocation strategies contiguous, linked and indexed.
What criteria should be used in deciding which strategy should be utilized for a particular
file?

12.

What does file structuring mean? What are the advantages of file structuring? Does
UNIX support file structuring?

13.

Explain the following:


a) Sequential access file - Random access files
b) Indexed, sequential access files

14.

What are the commonly employed free space management techniques under contiguous
allocation policy?

15.

Explain how flat directories are implemented.

CPU SCHEDULING
16.

Define a process. Present the process state diagram and explain.

17.

What is need of a PCB? What are its contents?

18.

Describe the differences between short-time, medium-term and long-term scheduling.

19.

Which of the following are reasonable long-term and short-term scheduling algorithms
and why;
(a) FCFS
(b) Round-Robin
(c) SJF
(d) Longest-Job-First
(e) Highest - Priority - First
(f) Last-Come-First-Served.

20.

Assume you have the following jobs to execute with one processor:
Job#
Burst-time
Priority
1
10
3
2
1
1
3
2
3
4
1
4
5
5
2
The jobs are assumed to have arrived in the order 1,2,3,4,5 in the ready queue.
Give a Gantt chart using FCFS, Round-Robin (quantum =1); SJF and a non- preemptive
presumptive priority scheduling algorithm.
Calculate the average T.A time for each of the algorithms. Calculate the average waiting
time for each of the algorithms

21.

Define the difference between preemptive and non-preemptive scheduling. State why
strict non-preemptive scheduling is likely to be used in a computer center.

22.

Give an equation to relate the following three time for a job.


(a) Turnaround time
(b) CPU busy time
(c) Waiting time

23.

Suppose a scheduling algorithm ( at the level of short-term CPU scheduling) favors


those programs which have used little processor time in the recent past. Why will this
algorithm favor I/O - bound programs and yet not presently starve CPU-bound
programs?

24.

Briefly describe the multilevel queues and multi-level feedback queues.

25.

What are scheduling algorithms? What are the different criteria for selecting a scheduling
algorithm?

26.

Four jobs A, B, C and D of duration 4 sec, 3 sec, 2 sec, and 1 sec are coming in that
order. If SJF process scheduling algorithm is employed what is the average turn around
time.

MEMORY MANAGEMENT:
27.

Explain the following allocate algorithms:


(a) First - fit
(b) Best - fit
(c) Worst - fit

28.

What are the various allocation policies in variable partition multiprogramming?

29.

Using a page size of 4 words, a physical memory of 32 words is divided into 8 pages.
Assuming page 0 is residing in frame 5; calculate the physical address on to which the
logical address 3 is mapped.

30.

Consider a logical address space of 8 pages of 1024 words mapped onto a physical
memory of 32 frames.
(a) How many bits there in the logical address?
(b) How many bits are there in the physical address?

31.

Explain the differences between internal and external fragmentation.

32.

Present the concept of segmentation and discuss its hardware.

33.

Why are the segmentation and paging sometimes combined into one scheme?

34.

Consider the segment table:


Segmmt
Base
0
129
1
2300
2
90
3
1327
4
1952

Lenth
600
14
100
580
96

What are the physical addresses for the logical addresses?


(a) 0,430
(b) 1,10 (c) 1,11 (d) 2,500 (e) 3,400 (f) 4,112.
35.

Name different memory management schemes and compile


a) Contiguous vs non-contiguous memory management schemes.
b) Real vs. virtual memory management schemes
c) Paging vs. segmentation

36.

Explain the address translation mechanism in paging? Why is the page size normally
some power of two?

37.

Discuss the impact of page size on the overall system performance.

38.

Consider a main memory with the capacity of 4 page frames.


Assume that the pages of a process are referenced in the order as given below:
1,3,4,4,3,2,1, 7,5,6,4,2,1,2.
Which of FIFO or LRU would be better in this case as a page replacement policy & why?

DEADLOCK
39.

How can operating systems be constructed to ensure that a deadlock is handled


properly?

40.

A system is composed of four processes, {P1, P2, P3, P4} and three types of serially
focusable resources, {R1, R2, R3}. The number of units of the resources is C=< 3,2,2>.
a) P1 holds 1 unit of R1 and requests 1 unit of R2
b) P2 holds 2 units of R2 and requests 1 unit each of R1 and R3
c) P3 holds 1 unit of R1 and requests 1 unit of R2
d) P4 holds 2 units of R3 and requests 1 unit of R1
Show the reusable resource graph to represent this system state.
Show the reduced form of the graph. Which, if any, of the processes are deadlocked in
this state?

41.

Define the terms `rollback' and `starvation' and explain how these are happened for the
river crossing problem. How to overcome the starvation?

42.

State and explain the necessary conditions to occur a deadlock.

43.

Are the four necessary conditions to occur a deadlock?


Mutually exclusive? If not, can you give a `minimal set of necessary conditions?

44.

Briefly explain the methods of deadlock prevention.


Separately considering (i) mutual exclusion, (ii) Hold and wait (iii) circular wait and (iv) No
preemption.

45.

Given the following table at time to find a safe sequence. Assume that 12 magnetic tape
drives are available in the system
Maximum needs current needs
P0
10
5
P1
4
2
P2
9
2
If at time T1, process P2 requests and is allocated one more tape drive, then show that
the system will be no longer in a safe state.

46.

Present the Banker's algorithm for several instances of a resource type.

47.

Present the safety algorithm. Prove that the safety algorithm requires an order of
maximum 2 operations where m is the no. of resource types and n is the no. of
processes in the system.

48.

What is the main difference between deadlock and starvation?

49.

Consider a system of m resources of the same type, being shared by n processes. Show
that the system is deadlock free if:
(a) Need i > 0 for i = 1,2, ...,n
(b) The sum of all maximum needs is less than m & n.

50.

Present the deadlock detection algorithm for several instances of a resources type.

You might also like