85.9k views
4 votes
A computer provides each process with 65,536 bytes of physical address space divided into page-frames of 4096 bytes. A particular program has a text size of 32,768 bytes, a data size of 16,386 bytes, and a stack size of 15,870 bytes. Will this program fit in the address space?

1 Answer

0 votes

Answer:

No, we require 17 pages but we have only 16 pages available

Step-by-step explanation:

As computer provide allocated address space is 65,536 which is 2∧16 bytes and page size is 4096 bytes which is 2^12 bytes.

Therefore, the number that can be formed with each 4096 bytes are 16 pages (2^16 / 2^12 = 2^4).

That program text size is 32,768 bytes which is equal to 8 pages (32768/4096 = 8).

The data of the program require 16386 bytes which is equal to 5 pages (16386/4096 = 4.005) and the stack of that program require 4 pages (15870/4096 = 3.875).

Therefore, the program requires 17 pages but have only 16 pages that's why it doesn't fit in address space.

User Diamond
by
4.8k points