Вы находитесь на странице: 1из 13

http://scdlpapers.blogspot.

com/search/label/Operating%20System // Question banks

DEPT OF INFORMATION TECHNOLOGY

OPERATING SYSTEMS
IT204 / CS202

QUESTION BANK

UNIT – I
PART A
1. Explain the main structural elements of a computer .
2. Explain the instruction fetch and execute cycle.
3. How interrupts are accommodated in an instruction cycle?
4. What is an interrupt? How is it handled by OS?
5. Give different I/O Communication techniques.
6. Explain memory hierarchy.
7. In virtually all systems that include DMA modules, DMA access to main memory is
given higher priority than processor access to main memory. Why?
8. What is reentrant procedure?
9. What is an OS?
10. What are the functions of OS?
11. What do you mean by utility software? Give an example.
12. What do you mean by application software? Give an example.
13. Define system software.
14. List the services provided by OS?
15. Explain the role of OS as resource manager.
16. What do you mean by kernel?
17. Explain serial processing.
18. What are the problems faced by serial processing systems?
19. Explain batch processing.
20. What is JCL? Give two commands of JCL.
21. What is a monitor?
22. What is resident Monitor? Give its memory layout.
23. Explain multiprogrammed batch system.
24. What are the advantages of multiprogramming?
25. What do mean by time sharing systems?
26. Compare batched multiprogramming systems and time sharing systems.
27. Comment on operating systems design hierarchy.
28. What is a monolithic kernel?
29. Briefly write about microkernel architecture.
30. Define Symmetric Multiprocessing.
31. What are the characteristics symmetric multiprocessor?
32. List the advantages of SMP over uniprocessor architecture.
33. What are the developments that triggered the need for multitasking on PCs.
34.Briefly explain kernel/supervisor mode and user mode.

PART B
1.Explain in detail how interrupts are processed.

2.Define the essential properties of the following operating systems:


a) Batch b)Interactive
c)Time sharing d)Real time
e)Network f)Parallel
g)Distributed h)Clustered

3.Explain the different I/O communication techniques.

4.Discuss about the evolution of operating systems.

5. Give an overview of operating systems design hierarchy.

6.Explain the characteristics of modern operating systems.

7.Clearly explain about memory hierarchy and compare the performance of a simple two
level memory.

8.A computer consists of a CPU and an I/O device D connected to main memory M via a
shared bus with a data bus width of one word.The CPU can execute a maximum of 106
instructions per second.An average instruction requires 5 machine cycles, 3 of which use
memory bus.A memory read/write operation uses one machine cycle.Suppose that the
CPU is continuously executing “background” programs that require 95% of its
instruction execution rate but not any I/O instructions.Assume that one processor cycle
equals one bus cycle.Now suppose that very large blocks of data are to transferred
between M and D.
a)if programmed I/O is used and each one word I/O transfer requires the CPU to execute
two instructions, estimate the maximum I/O data transfer rate, in words per second
possible through D.
b)Estimate the same rate if DMA transfer is used.

UNIT – II

PART A
1. What is a process?
2. List the events that lead to process creation.
3. Write about the different process states, giving the 5 state process model.
4. List atleast 4 reasons for process termination.
5. What is the need for the suspend state?
6. When a process tries to write onto a read-only file, what happens?
7. Explain when does a transition from Blocked state to Blocked/Suspend state occur and
vice versa.
8. Explain when does a transition from Ready state to Ready/Suspend state occur and
vice versa.
9. What are the reasons for process suspension?
10. What does it mean to preempt a process?
11. What is a PCB?
12. What is a process image?
13. Explain the role of PCB?
14. What is a less privileged mode?
15. What is a more privileged mode?
16. List the steps involved in process creation.
17. What is a mode switch?
18. What is a process switch?
19. What is the difference between a process switch and a mode switch?
20. What is the difference between interrupt and trap? Give example.
21. Write note on Non process Kernel.
22. Write note on executing OS functions within user process?
23. What is a process based OS?
24. Define Thread.
25. What is multithreading?
26. What resources are typically shared by all of the threads of a process?
27. List reasons why a mode switch between threads may be cheaper than a mode switch
between processes.
28. Give 4 examples of use of threads in a single user multiprocessing system.
29. List advantages of ULTs over KLTs.
30. What are the disadvantages of microkernel design over monolithic design.
31. What are the disadvantages of microkernel based OS?
32. List the operations that are associated with threads?
33. What is thread synchronization?
34. Explain the relationship between threads and processes?
35. What is SMP?
36. Briefly explain about symmetric multiprocessor organization.
37. What is a microkernel?
38. What are the benefits of microkernel organization?
39. What is Monolithic OS?
40. What is the basic form of communication between processes or threads in
microkernel based OS?

PART B
1. Explain in detail the single thread and multithread process model with diagrams.
2. Compare user level and kernel level threads with necessary diagrams.
3. Compare Master/Slave and SMP architecture.
4. Explain how micro kernel architecture differs from layered kernel architecture.
5. a)Explain the various reasons involved in process creation and termination.
b) Compare mode switching and process switching in detail.

6. With neat diagram explain the five states involved in process model.

7. Explain the various control tables with respect to operating system structure.

8. With suitable diagrams, explain the various elements reside in a process image.

9. a) Draw a queueing diagram for the 7 state process model.


b) In the discussion of ULT and KLT, it was pointed out that a disadvantage of ULTs is
that
when a ULT executes a system call not only is that thread blocked but all of the threads
with in the process are blocked . Why it is so?

UNIT III
PART A
1. What is the difference between multiprogramming and multiprocessing?
2. What is critical section?
3. Explain mutual exclusion briefly.
4. What is meant by deadlock?
5. What is meant by starvation?
6. What does livelock mean?
7. List the requirements for mutual exclusion?
8. What is concurrency?
9. What is the basic requirement for the execution of concurrent processes?
10. What is the difference between competing processes and cooperating processes?
11. What is critical resource?
12. What is busy waiting? Give an example.
13. Write the three types of communications between processes.
14. List the three major complications that concurrent processing add to an operating
system.
15. What is synchronization?
16. Demonstrate the use testandset instruction for implementing mutual exclusion.
17. What are the disadvantages of hardware support of mutual exclusion.
18. What is a semaphore?
19. Explain how semaphores may be inspected/manipulated?
20. What do you mean by weak and strong semaphore?
21. State producer/consumer problem.
22. What is a monitor?
23. What conditions are generally associated with readers and writers problem?
24. What are the three conditions that must be present for deadlock to be possible?
25. What are the four conditions that create deadlock?
26. Give example for reusable and consumable resource.
27. How can the hold and wait condition be prevented?
28. List two ways in which no-preemption condition can be prevented.
29. How the circular wait condition be prevented?
30. What is the difference among the dead lock avoidance, prevention and detection?
31. What is safe and unsafe state?
32. Define turnaround time, waiting time, and response time.
33. What do you mean by scheduling?
34. What are the types of scheduling? Give example.
35. Write the difference between preemptive and non preemptive scheduling?
36. Briefly describe the three types of processor scheduling.
37. Briefly explain FCFS scheduling.
38. Briefly explain Round robin scheduling.
39. Briefly explain SPN scheduling.
40. Briefly explain SRTF scheduling.
41. Briefly explain HRRN scheduling.
42. Briefly explain Feedback scheduling.

PART B

1. Consider the following set of processes with the length of CPU burst time given in ms.
Process Burst time Priority

P1 8 3
P2 3 1
P3 4 4
P4 2 2
P5 6 5

Processes are assumed to have arrived in the order P1, P2, P3, P4 & P5 and all at time 0.

i. Draw 4 Gantt charts illustrating the execution of these processes using FCFS,SJF non-
preemptive, RR(quantum =2) scheduling.
ii. What is turnaround time, waiting time, average waiting time of each process for each
of the scheduling?

2. a)Explain Dekkar’s algorithm for solving mutual exclusion problem.


b)Consider a system with a total of 150 units of memory, allocated to three processes as
shown:

Process Max Hold


1 70 45
2 60 40
3 60 15
Apply banker’s algorithm to determine it would be safe to grant each of the following
requests.If yes, indicate a sequence of terminations that could be guaranteed possible.If
no, show the reduction of the resulting allocation table.
i.A fourth process arrives with maximum memory need of 60 and initial need of 25 units.
ii. A fourth process arrives with maximum memory need of 60 and initial need of 35
units.

3. a)Explain Peterson’s algorithm for solving mutual exclusion problem.


b)M processes share N resource units that can be reserved and released only one at a
time.The maximum need of each process does not exceed M, and the sum of all the
maximum needs is less than M+N.Show that a deadlock cannot occur.

4. a)How will you achieve mutual exclusion through hardware support.


b)What is a binary semaphore?Explain the algorithm for implementing
infinite buffer producer/consumer problem using binary semaphore.

5. a)Explain the use of semaphore for process co-ordination.


b)Is busy waiting always less efficient in terms of processor utilization than blocking
wait?Explain.

6. a)Explain mutual exclusion using semaphore.


b)Apply deadlock detection algorithm to the following and show the results.
Available = 2 1 0 0

20010010
Request = 1 0 1 0 Allocation = 2 0 0 1
21000120

7. Clearly explain with the help of an algorithm, how the infinite buffer
producer/consumer problem may be solved using semaphore.

8. Clearly explain with the help of an algorithm, how the finite buffer producer/consumer
problem may be solved using semaphore.

10.Consider the following snapshot of a system.There are no current outstanding


queued unsatisfied requests.
available
r1 r2 r3 r4
2100

Current allocation maximum demand still needs


Process r1 r2 r3 r4 r1 r2 r3 r4 r1 r2 r3 r4
P1 0 0 1 2 0 0 1 2
P2 2 0 0 0 2 7 5 0
P3 0 0 3 4 6 6 5 6
P4 2 3 5 4 4 3 5 6
P5 0 3 3 2 0 6 5 2

a)Compute what each process still might request .


b)Is the system currently in safe or unsafe state ? Why?
c)Is the system currently deadlocked? Why or Why not?
d)Which processes, if any, are or may become deadlocked?
e)If a request for P3 arrives for (0,1,0,0) , can that request be safely granted immediately?
In what state ( deadlocked, safe,unsafe) would immediately granting that whole request
leave the system?Which processes, if any are or may become deadlocked if this whole
request is granted immediately?

IV UNIT

PART A
1.What do you mean by address binding?
2.With an example, explain overlays.
3.What do you mean by swapping?
4.What requirements are memory management intended to satisfy?
5.Why is the capability to relocate processes desirable?
6.Why is it not possible to enforce memory protection at compile time?
7.What are some reasons to allow two or more processes to all have access to a particular
region of memory?
8.In a fixed partitioning scheme, what are the advantages of using unequal size
partitions?
9.What is the difference between internal and external fragmentation?
10.Given memory partitions of 100KB,500KB,200KB,300KB,and 600KB in that order,
how would each of the first-fit,best-fit, and worst-fit algorithms place the processes of
212KB,417KB,112KB,and 426KB(in order)?Which algorithm makes most efficient use
of memory?
11.Describe first-fit allocation algorithm.
12.Describe best-fit allocation algorithm.
13.What are the distinctions among logical, relative, and physical addresses?
14.What is the difference between a page and a frame?
15.What is the difference between a page and a segment?
16.Consider a logical address space of 8 pages of 1024 words each, mapped onto a
physical memory of 32 frames.
a)How many bits are in the logical address?
b)How many bits are in the physical address?
17.Consider a paging system with the page table stored in memory.If a memory reference
takes 200 nanoseconds,how long does a paged memory reference take?
18.What is the effect of allowing two entries in a page table to point to the same page
frame in memory?
19.Consider the segment table:
segment base length
0 219 600
1 2300 14
2 90 100
3 1327 580
4 1952 96

What are the physical addresses for the following logical addresses?
a)0430 b)2500
20.Consider the segment table:
segment base length
0 219 600
1 2300 14
2 90 100
3 1327 580
4 1952 96

What are the physical addresses for the following logical addresses?
a)0430 b)4112

21.What is the difference between simple paging and virtual memory paging?
22.Explain LRU page replacement algorithm.
23.Explain FIFO page replacement algorithm
24.Consider the following page reference string:
1,2,3,4,2,1,5,6,2,1,2,3,7,6
How many page fault would occur for LRU page replacement algorithm assuming 3
frames?
25. Consider the following page reference string:
1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1
How many page faults would occur for FIFO page replacement algorithm assuming 4
frames?
26.What is Belady’s anomaly?Give an example.
27.Explain thrashing?
28.Why is the principle of locality crucial to the use of virtual memory?
29.What elements are typically found in page table entry? Briefly define each element.
30.What is the purpose of a translation lookaside buffer?
31.What is the relationship between FIFO and clock page replacement algorithm?
32.What is accomplished by page buffering?
33.What is the difference between resident set and working set?
34.What is the difference between demand cleaning and precleaning?
35.What is compaction?
36.What is a buddy system?

PART B

1.With the help diagrams and tables, explain dynamic partitioning memory management
techniques.What are the advantages and disadvantages of this scheme?

2.What is meant by relocation?With the help diagrams, clearly explain the need for
relocation and
its implementation.Give the details of hardware support.

3.a)Explain the buddy system in detail.


b)Consider a buddy system in which a particular block under the current allocation has an
address of 011011110000.
i.If the block size is 4, what is the binary address of its buddy?
ii.If the block size is 16, what is the binary address of its buddy?

4.a)Explain simple paging technique, giving details of page table and address translation.
b)Consider the two dimensional array A:
int A[][] = new int[100][100];
where A[0][0] is stored at location 200, in a paged memory system with pages of size
200.A small process resides in page 0(locations 0 to 199) for manipulating the A
matrix;thus, every instruction fetch will be from page 0.
For 3 page frames, how many page faults are generated by the following array
initialization loops, using LRU replacement, and assuming page frame has the process in
it, and the other two are initially empty:
i. for(int j=0;j<=100;j++)
for(int i=0;i<=100;i++)
A[i][j]=0;

ii. for(int i=0; i <=100;i++)


for(int j=0;j<=100;j++)
A[i][j]=0;

5.a) What do you mean by page fault?Explain the response of the operating system to a
page fault in detail.
b)Assuming a page size of 4Kbytes and that a page table entry takes 4 bytes, how many
levels of page tables would be required to map a 64bit address space, if the top level page
table fits into a single page?

6.A process has 4 page frames allocated to it.The time of the last loading of the page
frame, the time of the last access to the page in each page frame, the virtual page number
in each frame, and the referenced ( R ) and modified (M) bits for each frame are as
shown( the times are clock ticks from the process start at time 0 to the event).

Virtual page
Number Page Frame Time
loaded Time
referenced R bit M bit
2 0 60 161 0 1
1 1 130 160 0 0
0 2 26 162 1 0
3 3 20 163 1 1

A page fault to virtual page 4 has occurred.Which page frame will have its contents
replaced for each of the following memory management policies?Explain why in each
case.
a)FIFO
b)LRU
c)Clock
d)Optimal

7.A process has 4 page frames allocated to it.The time of the last loading of the page
frame, the time of the last access to the page in each page frame, the virtual page number
in each frame, and the referenced ( R ) and modified (M) bits for each frame are as
shown( the times are clock ticks from the process start at time 0 to the event).

Virtual page
Number Page Frame Time
loaded Time
referenced R bit M bit
2 0 60 161 0 1
1 1 130 160 0 0
0 2 26 162 1 0
3 3 20 163 1 1

Given the above state of memory, consider the following virtual page reference string:

4,0,0,0,2,4,2,1,0,3,2

How many page faults would occur if the working set policy were used with a window
size of 4 instead of a fixed allocation?Show clearly when each page fault would occur.
8.a)Explain how address translation is implemented in a two level paging system.
b)With the help of a flow chart, explain the operation of paging and translation lookaside
buffer.

9)a)Explain the principles of combined paging and segmentation scheme.


b)Consider a page reference string for a process with a working set of M frames, initially
all empty.The page reference string is of length P with N distinct page numbers in it.For
any page replacement algorithm,
i. What is a lower bound on the number of page faults?
ii. What is an upper bound on the number of page faults?

10.Consider a system with memory mapping done on a page basis and using single level
page table.Assume that the necessary page table is always in memory.
a)If a memory reference takes 200ns, how long does a paged memory reference take?
b)Now , an MMU is added that imposes an overhead of 20ns on a hit or miss.If we
assume that 85% of all memory references hit in the MMU TLB, what is the effective
access time?
c)Explain how the TLB hit rate affects the EMAT?

V UNIT

PART A
1.What is block-oriented devices?
2.Explain DMA.
3.What is buffereing?
4.Compare data rates between Floppy disks and hard drive.
5.What is buffer swapping?
6.Explain CSCAN method.
7.What is Nstep SCAN and FSCAN.
8.What is disk cache?
9.Explain file management system.
10.What is indexed sequential file?
11.What is hashed file?
12.Explain variable length blocking .
13.What is NTFS?
14.Explain indexed file allocation.
15.What is INODE?
16.What is the difference between logical I/O and device I/O?
17.What is the importance of double buffer than single buffer.?
18.What delay elements are involved in disk read/write?
19.What is the typical disk sector size?
20.What criteria are important in choosing file organizations?
21.Why is the average search time to find a record in a file less for an indexed sequential
file than for a sequential file?
22.List the three blocking methods.
23.List and briefly define three file allocation methods.
24.What are typical access rights that may be granted or denied to a particular user for a
particular file.?
25.What is the difference between a file and database.
26.What is seek time?
27.What is rotational delay?
28.Explain stream oriented devices?
29.Explain double buffer and circular buffering?
30.Explain SSTF algorithm?
31.What is the difference between FSCAN and CSCAN?
32.What is tape drive?
33.Explain device driver?
34.What is the difference between indexed and indexed sequential file?
35.What is pile file method?
36. Explain why SSTF scheduling tends to favor middle cylinders over the innermost and

outermost cylinders.

PART B
1. Discuss the evolution of I/O functions.
2. Explain the following I/O organizations model.
a.Local peripheral device.
b.Communications port.
c.File system.
3 Explain the various I/O buffer schemes?
4 What are the various disk scheduling polices? Explain.
5 Explain the design and performance considerations of disk cache.
6 a)Explain the basic file system architecture.
b) The disk rotates at 7,200 RPM,
i)What is the average rotational latency of this disk drive?
ii)What seek distance can be covered in the time that you found for part a?

7 Explain the various file organizations methods in detail with diagrams.


8 What are the various record blocking methods? Explain in detail.
9 What are the various file allocation methods ? Explain in detail?
10 Write notes on File directories.
11. Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4999. The drive is
currently
serving a request at cylinder 143, and the previous request was at cylinder 125. The
queue of pending requests, in FIFO order, is
86,1470,913,1774,948,1509,1022,1750,130.
Starting from the current head position, what is the total distance (in cylinders) that the
disk arm moves to satisfy all the pending requests for each of the following disk-
scheduling algorithms?
a.FCFS
b.SSTF
c.SCAN
d.LOCK
e.C-SCAN
f..C-LOOK

12.Compare the performance of C-SCAN and SCAN scheduling, assuming a uniform


distribution of requests. Consider the average response time (the time between the arrival
of
a request and the completion of the request’s service), the variation in response time, and
the
effective bandwidth.How does performance depend on the relative sizes of seek time and
rotational latency?

Вам также может понравиться