How does the logical vs. physical address space affect compilation, linking, and loading?
Solution:
Physical address space:
Physical Address refers to location in memory unit(the one that is loaded into memory). The set of all physical addresses corresponding to these logical addresses is referred to as a physical address space.
Logical address space:
Logical address is generated by CPU in perspective of a program. The set of all logical addresses generated by a program is referred to as a logical address space.
Virtual and physical addresses are the same in compile-time and load-time address-binding schemes. Virtual and physical addresses differ in execution-time address-binding scheme.
Now question arises, How does the logical vs. physical address space affect compilation, linking, and loading?
An address binding can be done in three different ways:
Compilation: If you know that during compile time where process will reside in memory then absolute address is generated i.e physical address is embedded to the executable of the program during compilation. Loading the executable as a process in memory is very fast. But if the generated address space is preoccupied by other process, then the program crashes and it becomes necessary to recompile the program to change the address space.
Loading: If it is not known at the compile time where process will reside then relocatable address will be generated. Loader translates the relocatable address to absolute address. The base address of the process in main memory is added to all logical addresses by the loader to generate absolute address. In this if the base address of the process changes then we need to reload the process again.
Linking: The instructions are in memory and are being processed by the CPU. Additional memory may be allocated and/or deallocated at this time. This is used if process can be moved from one memory to another during execution(dynamic linking-Linking that is done during load or run time). e.g – Compaction.
Please give thumbsup, if you like it. Thanks.
How does the logical vs. physical address space affect compilation, linking, and loading?
Consider a logical address space of 4 pages of 1024 words each, mapped onto a physical memory of 16 frames. a. How many bits are there in the logical address? b. How many bits are there in the physical address?
Consider a logical address space of 8 pages; each page is 2048 byte long, mapped onto a physical memory of 64 frames.(i) How many bits are there in the logical address and how many bits are there in the physical address?(ii) A 6284 bytes program is to be loaded in some of the available frames ={10,8,40,25,3, 15,56,18,12,35} . Show the contents of the program's page table.(iii) What is the size of the internal fragmentation?(iv) Convert the following logical addresses 2249...
2. Consider a logical address space of 4 pages of 1024 words each, mapped onto a physical memory of 16 frames. a. How many bits are there in the logical address? b. How many bits are there in the physical address?
Consider a logical address space of 512 pages with a 4-KB page size, mapped onto a physical memory of 256 frames. How many bits are required in the logical address? How many bits are required in the physical address?
Consider a logical address space of 256 pages with a 4-KB page size, mapped onto a physical memory of 64 frames. a. How many bits are required in the logical address? b. How many bits are required in the physical address?
Operating systems
Consider a logical address space of 4 pages of 1024 words each, mapped onto a physical memory of 16 frames. a. How many bits are there in the logical address? b. How many bits are there in the physical address? te: Show the calculation.)
In a system using paged segmentation, the logical address space of each process consists of a maximum of 16 segments, each of which can be up to 64 Kbytes in size. Physical pages are 512 bytes. Determine how many bits are needed to specify each of the quantities below, justifying each of your answers by demonstrating the calculations. a) Segment number (segment address) b) Number of a logical page within the segment c) Displacement within a page e) Complete logical...
Its multi part. please make sure to solve all parts. Consider a logical address space of eight pages of 1024 words, each mapped onto a memory of 32 frames. c. How many bits are in the offset for the logical address d. How many bits are in the offset for the physical address e. How many bits are in the Frame Number f. How many bits are in the Page Number
Operating Systems Name two differences between logical and physical addresses. Why are page sizes always powers of 2? Consider a logical address space of 64 pages of 1,024 words each, mapped onto a physical memory of 32 frames. a. How many bits are there in the logical address? b. How many bits are there in the physical address?
Given the following list of logical addresses and page table, calculate the physical address of each logical addresses. Page size 200. Please calculate the physical addresses using single level page table: Physical Address 460 250 770 980 30 Page # 3 4 Physical Address Logical Addresses: 5, 23 2, 12 3, 52 4,25 5, 63