written 5.8 years ago by | modified 4.7 years ago by |
a. How many bits are required in the logical address ?
b. How many bits are required in the physical address ?
written 5.8 years ago by | modified 4.7 years ago by |
a. How many bits are required in the logical address ?
b. How many bits are required in the physical address ?
written 5.6 years ago by | • modified 5.6 years ago |
Address Translation:
Logical address is generated fig the CPU, this address is also called as virtual address.
Main memory address uses physical address and this address is called as read address.
Set of all logical address generated by a program is called as logical address space.
Memory management unit (MMU) is responsible for routine address mapping from virtual to physical address.
- They are of 2 types
a) paging.
b) segmentation.
In paging, operating system divides each incoming program into pages of equal size. the sections of main memory are called as page frames which are of fixed size block.
Breaking of logical memory into block of same size are called as pages.
In segmentation, a program data and instruction are divided into block called segment.
A segment is a logical entity, in a program.
All segment size may be equal or may not be equal and collection of segment is called as logical address space and each segment in identified fig its name.
Processor generates logical address. there address consist of segment number and an effect into the segment.
Segment number is used as an index to segment page table and segment names are normally symbolics name.
Operating system maintain a segment table for process. it is usually stored in main memory as a segment that in net to be loaded as long as the process can run.
Each entry in the segment table has a segment base and segment relocation register for the target segment.
The segment limit field contains the length of the segment.
Segment table contains the physical address of the start of segment then add the effort to the phase and generates the physical address.
If the required reference is not found in one of the segment register, then the error is generated.
At the same time operating system look up in segment table and loads the new segment descriptor into the register.
Segment descriptor:
paging:
Fixed size block in the memory are called frames and breaking of logical memory into a block of same size called as pages.
Memory manager prepares following things before executing a program.
Find out number of pages in program.
Find free space in main memory.
Loading of all the program pages into memory.
page number.
page offset.
page table contain page number and index frame number, page number is used as an index into page table.
The physical address is the portion of the primary. memory address allocated to the process and page frame allocated to the process need not be continuous.
Logical address space.
Total number of page = 32 = $2^5$
page size = 1024 words = $2^10$
$\therefore LA = 2^10 \times 2^5$
= $2^15$
i.e. Bit required in logical address = 15 bits.
physical memory.
Total no. of frame = 16 = $2^4$
size of frame = 1034 words = $2^10$
physical address = $2^10 \times 2^4 = 2^14$
$\therefore$ bit required in physical address = 14 bits.