112k views
1 vote
A system uses segmentation with paging. Page size is 2048 words. A segment table contains the following segment sizes.

Size

2 2167

4 2571

For each segment, determine:
the number of pages occupied by the segment

Segment No. of Pages s p w
2 ? ? ? ?
4 ? ? ? ?

User Ramadhan
by
8.5k points

1 Answer

1 vote

Final answer:

To calculate the number of pages each segment occupies, the segment size is divided by the page size and the result is rounded up to the nearest whole number using the ceiling function. For segment sizes of 21674 and 2571 with a page size of 2048 words, the number of pages are 11 and 2 respectively.

Step-by-step explanation:

The question pertains to calculating the number of pages a segment occupies in a system that uses segmentation with paging, particularly where the page size is 2048 words. This type of calculation falls within the realm of 'Operating Systems,' which is a sub-discipline of Computer Science.

To determine the number of pages for each segment, we'll use a simple formula: Number of Pages = ceil(Segment Size / Page Size). Here, 'ceil' refers to the ceiling function, which rounds up to the nearest whole number because you can't have a fraction of a page.

Let's calculate the number of pages for each segment:

  • For a segment size of 21674, Number of Pages = ceil(21674 / 2048) = ceil(10.57959) = 11 pages.
  • For a segment size of 2571, Number of Pages = ceil(2571 / 2048) = ceil(1.25537) = 2 pages.

User Wallice
by
7.7k points