Ps 2 Os
Ps 2 Os
Q1: Free memory holes of sizes 15K, 10K, 5K, 25K, 30K, 40K are available. The processes of
size 12K, 2K, 25K, 20K is to be allocated. How processes are placed in first fit, best fit, worst
fit. Calculate internal as well as external fragmentation.
Q3: Consider a system consisting of four resources of the same type that are shared by three
processes, each of which needs at most two resources. Is this system deadlock-free? Why or
why not?
Q6. An operating system uses the Banker’s algorithm for deadlock avoidance when managing
the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table
given below presents the current system state. Here, the Allocation matrix shows the current
number of resources of each type allocated to each process and the Max matrix shows the
maximum number of resources of each type required by each process during its execution.
There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The
system is currently in a safe state. Consider the following independent requests for
additional resources in the current state:
Q7. A system shares 9 tape drives. The current allocation and maximum requirement of tape
drives for 4 processes are shown below:
Q8: Consider a computer system with 40-bit virtual addressing and page size of sixteen
kilobytes. If the computer system has a one-level page table per process and each page table
entry requires 48 bits, then the size of the per-process page table is __________ megabytes.
Q9: A computer system implements 8 kilobyte pages and a 32-bit physical address space. Each
page table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the
maximum size of the page table of a process is 24 megabytes, the length of the virtual address
supported by the system is ________ bits.
Q10: Consider a paging hardware with a TLB. Assume that the entire page table and all the
pages are in the physical memory. It takes 10 milliseconds to search the TLB and 80
milliseconds to access the physical memory. If the TLB hit ratio is 0.6, the effective memory
access time (in milliseconds) is