368 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

1.1k
views
1 answers
5 votes
habedo007 asked Aug 8, 2017
1,057 views
A computer has a 128-entry $L_1$ TLB, 1024-entry $L_2$ TLB, and uses page size of 4KB. A program reads a 1MB array, one byte at a time from start to end, 10 ... , find TLB hits and misses of both $L_1$ and $L_2$ TLB (array is page aligned).
500
views
1 answers
2 votes
AnilGoudar asked Jan 2, 2018
500 views
1) Why multi-level paging is used and what are its advantages?2) Why paging is used in segmentation?
1.8k
views
1 answers
1 votes
Shubhanshu asked Aug 14, 2017
1,787 views
Processor:- 32 bit with 4 KB page size.RAM: - 4 GB with 220 frames in the RAM.Process:-> Process Name - MOTO GP > Process Size - 1GB> Frame Size - 4 ... of 7 GB, I think which introduces the concept of virtual memory but don't know how?
794
views
0 answers
2 votes
gatejr asked Jun 10, 2016
794 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 ... have used formula given in case 3 and not in case 2 in case of page faults?