Logical & Physical Address Space | Resource Allocation Graph

By:   Last Updated: in: ,

Intro: Q1.Difference between Logical and Physical Address Space? Q2.Explain Resource Allocation Graph with the help of an example? (Operating System all notes)

Logical-and-Physical-Address-Space-in-Operating-System

Q1. Difference between Logical and Physical Address Space?

Ans. Difference between Logical and Physical Address Space:
The logical address is one that is generated by CPU also referred to as a virtual machine address. The physical address is the actual address understood by computer hardware, memory unit. During logical to physical address translation care is taken by the operating system.

The term virtual memory refers to the abstraction of separating logical memory. Because of this separation, the programmer needs to be aware of only the logical memory space while the operating system maintains two or more levels of physical memory space.
Diagram-of-Logical-and-Physical-Address-Space-example
The Memory Management Unit (MMU) handles translations of these addresses. MMU is a hardware device that maps logical addresses to the physical address. It maps the virtual address to the real store location. The simple MMU scheme adds the relocation register contents to the base address of the program that is generated at the time it is sent to memory.


Resource-Allocation-Graph-in-Operating-System

Q2. Explain Resource Allocation Graph with the help of an example?

Ans. Resource Allocation Graph (RAG)
(a) Deadlock can be described through a resource allocation graph.
(b) The RAG consists of a set of vertices P ={P1, P2,...,Pn} of processes and R = {R1,R2 .....,Rm } of resources.
(c) A directed edge from a process to a resource, Pi → Rj, implies that Pi has requested Rj.
(d) A directed edge from a resource to a process, Rj → Pi, implies that Rj has been allocated by Pi.
(e) If the graph has no cycles, deadlock cannot exist. If the graph has a cycle, deadlock may exist.
Example:
Diagram-of-Resource-Allocation-Graph-example






External Links:-

1. Logical and Physical Address Space - (click here)
2. Resource Allocation Graph - (click here)

No comments:
Write comment