In: Computer Science
Q1 / 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. Show that the system is deadlock-free.
Q2 / Sometimes, segmentation and paging are joint into one scheme. Why, explain in your words.
Q1) Let us consider that the system is in deadlock state. Which means that every process has got one resource and is waiting for one more resource. According to the question there are three processes and four resources, so one process must be able to get two resources. This process will require no more resource and therefore it can finish it's execution. After the execution is completed the process will return it's resources which will be allocated to other processes.
Q2) Segmentation and paging are often joint into one scheme. It
is helpful when the page table size is very large. A large, unused
and contiguous section of the page table can be compressed into a
single segment table entry with zero as the page table address. It
handles the case of large segments which require a lot of
allocation time. This approach reduces wasted
memory due to external fragmentation. It also makes the memory
allocation simpler.
Hope this helps.