274 views
0 votes
0 votes

Consider a System using Paging technique with an Address Space of65,536 Bytes. The Page Size in this System is 4096 Bytes. The Program Consists of Text, Data and Stack Sections as per the specifications given below:

Text: 32,768 Bytes

Data: 16,386 Bytes

Stack: 15,870 Bytes

A Page of the program contains portion of only one section i.e either Textor Data or Stack.

a)Does the Program Fit in the given Address Space?

b)What is the Maximum Page Size in Bytes such that the Program Fits in the Given Address Space? 

1 Answer

0 votes
0 votes

The total address space is 65,536 Bytes.

The program has three sections:

  1. Text: 32,768 Bytes
  2. Data: 16,386 Bytes
  3. Stack: 15,870 Bytes

a) To check if the program fits in the given address space, you can add the sizes of all sections:

32,768+16,386+15,870=65,024 Bytes32,768+16,386+15,870=65,024 Bytes

The sum is less than the total address space (65,536 Bytes), so the program fits in the given address space.

b) The maximum page size is determined by the smallest section size because a page can only contain a portion of one section. The smallest section size is the Stack section with 15,870 Bytes. Therefore, the maximum page size is 15,870 Bytes.

Related questions

2 votes
2 votes
1 answer
2
AnilGoudar asked Jan 2, 2018
441 views
1) Why multi-level paging is used and what are its advantages?2) Why paging is used in segmentation?
2 votes
2 votes
0 answers
4
gatejr asked Jun 10, 2016
757 views
Consider, 2 level paging , with Process P, Inner page table PTi, and outer page table PTo.Now we know that P and PTi are divided in various pages but PTo is in 1 page on...