PT2 Question Bank
PT2 Question Bank
PULLOOR, KARIAPATTI–626115
PERIODICAL TEST – II
Part A- 2marks
1. Which algorithm makes the most efficient use of memory? Given memory partitions
of 100K, 500K, 200K, and 600K (in order), how would each of the First-fit, Best-fit,
and Worst-fit algorithms place processes of  212K, 417K, 112K, and 426K (in
order)?
2. Consider a logical address space of eight pages of 1024 words each, mapped onto a
physical memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are there in the physical address?
6. Paging system consists of physical memory 2^24 bytes, pages of logical address space
is 256.Page size of 2^10 bytes, how many bits are in a logical address.
8. If the average page fault service time of 25 milliseconds and a memory access time of
100 nanoseconds. Calculate the effective access time.
13. Given a sequence of disk requests at cylinder numbers 98, 183, 37, 122, 14, and the
initial head position at cylinder 53, which request will be served first use the SSTF
(Shortest Seek Time First) algorithm?
14. Consider a logical address space of eight pages of 1024 words each, mapped onto a
physical memory of 32 frames. How many bits are in the logical address and physical
address?
15. Suppose that a system is in an unsafe state. Show that it is possible for the processes
to complete their execution without entering a deadlock state.
16. Differentiate logical memory from physical memory
17. When virtual memory is implemented in a computing system, there are certain costs
associated with the technique and certain benefits. List the costs and the 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?
18. How does the system discover thrashing?
19. Consider a logical address space of eight pages of 1024 words each, mapped onto a
physical memory of 32 frames. How many bits are in the logical address and physical
address?
20. What is meant by Demand Paging?
21. If the average page faults service time of 25 ms and a memory access time of
100ns.Calculate the effective access time
22. What are the steps required to handle a page fault in demand paging?
23. What are the types of Path Names?
24. What are conditions under which a deadlock situation may arise?
25. Give an example of an application in which data in a file should be accessed in the
following order: i. sequential ii. Random
26. Construct a Resource Allocation Graph for the following scenario. At time’t’ Process P1
request for a resource X, process P2 requests for a resource Y. Both the resources are
Available and they are allocated to the requesting process. At time t1 where t1>t2 both the
processes are still holding the resources, however process P1 request for Y which is held by
P2, process P2 request for X held by P1. Will there be a deadlock? if there is a deadlock
discuss the four necessary conditions for deadlock, else justify there is no deadlock .
27. Suppose that a system is in an unsafe state. Show that it is possible for the
processes to complete their execution without entering a deadlock state.
28. Differentiate logical memory from physical memory
29. Analyze the process of calculating the number of bits required for both the logical and
physical addresses in a memory system with a logical address space consisting of 8
pages, each containing 1024 words and physical memory with 32 frames.
30. What is meant by Demand Paging?
31. If the average page faults service time of 25 ms and a memory access time of
100ns.Calculate the effective access time.
32. How does the system discover thrashing?
33. Will optimal page replacement algorithm suffer from Belady’s anomaly? Justify your
Answer.
34. Explain the purpose of the open() and close() operations.
35. What are the types of Path Names?
36. Why rotational latency is usually not considered in disk scheduling? How would you
modify SSTF, SCAN, and C-SCAN to include latency optimization?
37. The queue of requests in FIFO is 86, 147, 91, 177, 94,150,102,175,130. What is the
total head movement needed to satisfy the requests for the FCFS Scheduling
algorithm.
38. Give an example of an application in which data in a file should be accessed in the
following order: i. sequential ii. Random
Part B-16 marks
1. Consider the following snapshot of a system:
Process Allocation Max Available
ABCD ABCD ABCD
a. Show that the four necessary conditions for deadlock hold in this example.
b. State a simple rule for avoiding deadlocks in this system.
6. Given memory Partitions of 100 KB,500 KB,200 KB,300 KB and 600 KB(in order) how
would each of the first-fit, best-fit and worst -fit algorithms place processes of 212 KB,417
KB,112 KB and 426 KB ?
(i) which algorithm makes the most efficient use of memory?
(ii)Consider the following segment table
Segment base length
0 219 60
1 2300 14
2 90 100
3 1327 580
What are the physical addresses for the following logical addresses?
a.0, 430 b. 1, 10 c. 2 500 d.3, 400
10. Why can VMMs not implement trap-and-emulate-based virtualization on some CPUs?
Lacking the ability to trap-and-emulate, what method can a VMM use to implement
virtualization
12. Consider a system with 80% hit ratio, 50 Nano-seconds time to search the associative
registers, 750 Nano-seconds time to access memory.
Find the time to access a page
(a) When the page number is in associative memory
(b) When the time to access a page when not in associative memory.
(c) Find the effective memory access time.
13. Consider a file system in which a file can be deleted and its disk space reclaimed while
links to that file still exist. What problems may occur if a new file is created in the same
storage area or with the same absolute path name? How can these problems be avoided?
14. Compare different disk scheduling algorithms (FCFS, SSTF, SCAN, C-SCAN, LOOK,
C-LOOK) and analyze their effectiveness in minimizing seek time and improving disk
throughput under various workload conditions. Analyze the trade-offs between fair ness and
performance in disk scheduling algorithms. Which scheduling algorithm strikes the best
balance, and why?
15. Consider that a disk drive has 5,000 cylinders, numbered 0 to 4,999.The drive is currently
serving 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 pending requests for each of the following disk scheduling
algorithms?
A. FCFS B. SSTF C. SCAN D. C-SCAN E. LOOK F. C-LOOK
16. Consider a file system in which a file can be deleted and its disk space reclaimed while
links to that file still exist. What problems may occur if a new file is created in the same
storage area or with the same absolute path name? How can these problems be avoided?
17. Consider a disk with 200 tracks and the queue has random requests from different
processes in the order:
55, 58, 39, 18, 90, 160, 150, 38, 184 Initially arm is at 100. Find the Average Seek length
using FIFO,SSTF, SCAN and C-SCAN algorithm
18. Analyze the open-file table is used to maintain information about files that are currently
open. Should the operating system maintain a separate table for each user or just maintain one
table that contains references to files that are Currently being accessed by all users? If the
same file is being accessed by two different programs or users, should there be separate
entries in the open-file table?