6. Answer the following questions about a program containing 512 bytes and an op
ID: 3878986 • Letter: 6
Question
6. Answer the following questions about a program containing 512 bytes and an operating system using a page frame size of 200 bytes. tore the entire progra B. How many bytes of external fragmentation exists when the entire program is stored in memory? C. How many bytes of internal fragmentation exists in page frame containing the first page of the program? D. How many bytes of internal fragmentation exists in page frame containing the last page of the program? E. On which page would you find the program instruction at byte 256? F. What is the displacement within the page of the program instruction at byte 256?Explanation / Answer
Question A
Program size = 512 bytes
Page frame size = 200 bytes
No of pages = Program size / page frame size = 512/200 = 3 (after rounding up)
Question B
To determine external fragmentation, we need to know what other processes already exist in memory. You can safely assume that the program was given 3 pages in contiguous memory locations and hence the external fragmentation is 0 bytes.
Question C
The first page would be completely used by the first 200 bytes of the program. Hence, internal fragmentation of the first page is 0 bytes.
Question D
In the last page, not all the memory locations will be used. The program needs 112 bytes (512 - 400) of memory after the first 2 pages have been filled. However, it has been allocated 200 bytes. Hence 200 - 112 = 88 bytes of internal fragmentation exist.
Question E
Program instruction at byte 256 would exist on the second page. Byte 1 to byte 200 would be on the first page. Byte 201 to byte 400 would be on the second page and so on.
Question F
The displacement within the page would be 56 as the 256th byte would be at the 56th location of the page since the 201st byte is on the first location.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.