12.7k views
1 vote
consider a system with 16 gb main memory and 32 bits virtual address space, with page size as 4 kb. frame size and page size is same for the given machine. if a process of size 34 kb is to be executed on this machine then what will be the size of internal fragmentation for this process?

User Workflow
by
7.4k points

1 Answer

3 votes

Final answer:

Internal fragmentation for a 34 KB process, with a page size of 4 KB, results in 2 KB of unused space in the last page.

Step-by-step explanation:

The correct answer is that internal fragmentation will be 2 KB for the given process. When a process is loaded into memory, it occupies a number of pages or frames. As each page is 4 KB, and the process size is 34 KB, it will occupy 9 pages (since 34 divided by 4 is 8 with a remainder). The last page will not be completely filled by the process since it needs only 2 KB out of the 4 KB available (34 KB is 8 full 4 KB pages plus an additional 2 KB), leading to an internal fragmentation of 2 KB in the last page since 4 KB - 2 KB equals 2 KB of unused space.

Internal fragmentation occurs when allocated memory is not fully utilized, resulting in wasted space within a memory block. In this case, the process size is 34 KB, which is larger than the page size of 4 KB. Since the frame size is the same as the page size, each frame can only accommodate one page. Therefore, the process will require 9 pages (34 KB / 4 KB). However, the total size of these 9 pages is less than the available main memory of 16 GB (16,000 MB).

Since the frames are equal in size to the pages, there is no internal fragmentation. All the allocated pages will fit perfectly into the available memory without any wasted space.

User Centralscru
by
8.3k points