1. What is the largest power of two to which the following numbers are aligned?
a. 11010101000002
b. 0xA3318
c. 0x2F379C
d. 0x7043000
2. How many address lines would be needed for each of the following amounts of memory space?
a. 819,200
b. 100 MB
3. How many 4K blocks of physical memory would be required after the program malloc’s 2 MB of virtual memory?
1. Alignment to the power of two is the largest power of 2 less than the given number
a. Assuming 11010101000002 is 1101010100000 to the base of 2
1101010100000 is aligned to 212.
b. 0xA3318
0xA3318 = (10100011001100011000)2 is aligned to 219.
c. 0x2F379C
0x2F379C = (1011110011011110011100)2 is aligned to 221.
d. 0x7043000
0x7043000 = (111000001000011000000000000)2 is aligned to 226.
2. For 2n bits, we need n address lines
a. 819200 Assuming this is Bytes
819200 Bytes = 6553600 bits = 0x640000 bits < 223 and > 222. So we needs 23 address lines
b. 100MB
100MB = 100 x 8 Mbits = 100 x 8 x 1024 kbits = 100 x 8 x 1024 x 1024 bits = 100 x 223 bits < 230 and > 229. So we need 30 address lines
3. If memory is aligned to 4KB blocks, 2MB memory would require (2x1024KB) / (4KB) = 512 blocks
Hope this helps. Do Upvote! :)
1. What is the largest power of two to which the following numbers are aligned? a....
OPERATING SYSTEMS 1. Given six memory partitions of 100 MB, 170 MB, 40 MB, 205 MB, 300 MB, and 185 MB (in order), how would the first‐fit, best‐fit, and worst‐fit algorithms place processes of size 200 MB, 15 MB, 185 MB, 75 MB, 175 MB, and 80 MB (in order)? Indicate which, if any, requests cannot be satisfied. Comment on how efficiently each of the algorithms manages memory in terms of fragmentation. 2. Consider a logical address space of 64...
Exercise l: Suppose that we have a virtual memory space of 28 bytes for a given process and physical memory of 4 page frames. There is no cache. Suppose that pages are 32 bytes in length. 1) How many bits the virtual address contain? How many bits the physical address contain? bs Suppose now that some pages from the process have been brought into main memory as shown in the following figure: Virtual memory Physical memory Page table Frame #...
7. In a cache system we have the following attributes: 4 GB of DRAM 256 MB of physical memory space 2 MB of cache IKB per cache line Determine number of lines in cache. a) Determine the number of address bits out of the processor. b) c) Determine the number of bits needed for the block offset section of the address. If our cache is 8-way set associative, how many sets are there in the cache? d) How many bits...
18. You have a byte-addressable virtual memory system with a two-entry TLB, a 2-way set associative cache, and a page table for a process P. Assume cache blocks of 8 bytes and page size of 16 bytes. In the system below, main memory is divided into blocks, where each block is represented by a letter. Two blocks equal one frame. Given the system state as depicted above, answer the following questions: a) How many bits are in a virtual address...
Virtual memory address translation: a) Consider a machine with a physical memory of 8 GB, a page size of 4 KB, and a page table entry size of 4 bytes. How many levels of page tables would be required to map a 52-bit virtual address space if every page table fits into a single page? b) Without a cache or TLB, how many memory operations are required to read or write a page in physical memory? c) How much physical...
Please help me with 2 questions in the following
pictures!
DMA uses physical memory addresses as following Select one: a. Virtual addresses are written into the DMA controller, then DMA must use MMU to have the physical- to-physical translation b. Virtual addresses are written into the DMA controller, then DMA must use MMU to have the physical- to-virtual translation C. OS convert the virtual address of the intended memory buffer into a physical address and write this physical address into...
1) Given a virtual memory system with: virtual address 36 bits physical address 32 bits 32KB pages (15 bit page offset) Each page table entry has bits for valid, execute, read and dirty (4 bits total) and bits for a physical page number. a) How many bits in the page table? (do not answer in bytes!) Three digit accuracy is good enough. The exponent may be either a power of 2 or a power of 10. b) The virtual address...
36.-Assume a 32 bit memory space with 16[KB] pages/frames and a two-level page table. Answer the following questions: a).-what is the size of the page table in bytes needed for a process that has only 64[MB] of code at the start of its virtual address range? b).-how many bits are used for address (frame) offset, and how many for page table indexing (total). Assume each page table entry has 32 bits. a).-Size of page table b).-Offset bits b).-Page table indexing...
SN 6 A system implements a paged virtual address space for each process using a one-level page table. The maximum size of virtual address space is 4KB. The page table for the running process Includes the following valid entries: Virtual Virtual page 7 - Page frame 4 Virtual Virtual page 5 - Page frame 0 Virtual Virtual page 20 - Page frame 1 Virtual Virtual page 10 - Page frame 3 Virtual Virtual page 3 - Page frame 2 The...
Q3. A computer has 128 MB of main memory organized logically as 32M blocks of 4 bytes each. It has a cache memory of 16 KB. Answer the following questions: a. How many address lines are required to access the main memory? [1 Mark] b. Determine how to split the address (s-r, r, w) for Direct Mapping. [2 Marks] c. Determine how to split the address (s-d, d, w) for 2-way set-associative mapping. [2 Marks]