Concepts of Paging with hardware implementation of page table

M.C.A. (Management faculty)
Operating System Concepts (2012 Pattern)
(IT-23) (Semester - II)

Time : 3 Hours Max. Marks 70

1. Instructions to the candidates:
2. Question no 1 and 7 are compulsory
3. Answer any three questions from remaining.
4. Draw neat diagrams if required.


Q.1) a.) Explain the concepts of Paging with hardware implementation of page table.

Paging is a memory-management technique that provides the non contiguous address space in main memory. Paging avoids external fragmentation. In this technique physical memory is broken into fixed-sized blocks called frames and logical memory is divided into blocks of the same size called pages. When a process is to be executed, its pages are loaded into any available memory frames from the backing store.

The address generated by CPU is called logical address and it is divided into two parts a page number (p) and a page offset (d). The page number is used as an index into a page table.The page table contains the base address of each page in physical memory. The combination of base address and page offset is used to map the page in physical memory address. Hardware decides the page size.



b.) Explain Resource Allocation Graph.

Ans.

Resource Allocation Graph.

Resource Allocation Graph is used to describe the deadlock. This graph contains the set of vertices (V) and edges (E). The set of vertices V is divided into two different types of nodes:

The set of all the active processes in the system P = {P1, P2, P3….Pn} denoted as …..

The set of all resource types in the system R = {R1,R2, R3 …Rm} denoted as ……

If a process needs any resources type then it request the resource and it is denoted as Pi → Ri (Process is currently waiting for that resource.)

If an instance of resource type has been already allocated to process then it is denoted as Ri → Pi
A directed edge Pi → Riis called a request edge; a directed edge Ri → Pi; is called an assignment edge.



Process P1 is holding an instance of resource type R1 and is waiting for an instance of resource type R2.

Process P2 is holding an instance of R2and iswaiting for an instance of R3.

Process P3 is holding an instance of R3 and is waiting for an instance of R4.

If the resource-allocation graph contains no cycles, then no process in the system is deadlocked. If the graph contains a cycle, then a deadlock may or may not exist.
Post your comment