1
16kviews
What is address translation ? Consider a logical space of 32 pages with 1024 words per page mapped onto a physical memory of 16 frames.

a. How many bits are required in the logical address ?

b. How many bits are required in the physical address ?

1 Answer
2
1.9kviews

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.

enter image description here

  • 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:

enter image description here

enter image description here

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.

  1. Find out number of pages in program.

  2. Find free space in main memory.

  3. Loading of all the program pages into memory.

enter image description here

  • The processor generates virtual (logical) address and it consist of 2 parts.
  1. page number.

  2. 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$

enter image description here

$\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.

Please log in to add an answer.