This problem studies the effect of changing page sizes in a demand paging system.  The following sequence of requests for program words is taken from a 460-word program: 10, 11, 104, 170, 73, 309, 185,245,246,434,458, and 364. Main memory can hold a total of 200 words for this program, and the page frame size will match the size of the pages into which the program has been divided.   Calculate the page numbers according to the page size; divide by the page size, and the quotient gives the page number. The number of page frames in memory is the total number, 200, divided by the page size. For example, in problem (a) the page size is 100, which means that requests 10 and 11 are on Page 0, and requests 104 and 170 are on Page 1. Therefore, the number of page frames is two.   a.)  Find the success frequency for the request list using a FIFO replacement Algorithm and a page size of 100 words (there are two page frames).   b.)  Find the success frequency for the request list using a FIFO replacement Algorithm and a page size of 20 words (10 pages, 0 through 9).   c.)  Find the success frequency for the request list using a FIFO replacement Algorithm and a page size of 200 words.   d.)  What do your results indicator ''Can you make any general statements about what happens when page sizes are halved or doubled?   e.)  Are there any overriding advantages in using smaller pages?  What are the offsetting factors? Remember that transferring 200 words of information takes less than twice as long as transferring 100 words because of the way secondary storage devices operate (the transfer rate is higher than the access, or search/find, rate).   f.)  Repeat (a) through (c) above, using a main memory of 400 words. The size of each page frame will again correspond to the size of the page.   g.)  What happened when more memory was given to the program? Can you make some general statements about this occurrence? What changes might you expect to see if the request list was much longer, as it would be in real life?      .   h.)  Could this request list happen during the execution of a real program? Explain.       i.)  Would you expect the success rate of an actual program under similar conditions to be higher or lower than the one in this problem?   Using the programming environment of your choice, (OS, language, etc.), please do the assignment above.  Please submit all files via the submission folder provided.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

This problem studies the effect of changing page sizes in a demand paging

system.  The following sequence of requests for program words is taken from a

460-word program: 10, 11, 104, 170, 73, 309, 185,245,246,434,458, and

364. Main memory can hold a total of 200 words for this program, and the

page frame size will match the size of the pages into which the program has

been divided.

 

Calculate the page numbers according to the page size; divide by the page size,

and the quotient gives the page number. The number of page frames in memory

is the total number, 200, divided by the page size. For example, in problem (a)

the page size is 100, which means that requests 10 and 11 are on Page 0, and

requests 104 and 170 are on Page 1. Therefore, the number of page frames is

two.

 

a.)  Find the success frequency for the request list using a FIFO replacement

Algorithm and a page size of 100 words (there are two page frames).

 

b.)  Find the success frequency for the request list using a FIFO replacement

Algorithm and a page size of 20 words (10 pages, 0 through 9).

 

c.)  Find the success frequency for the request list using a FIFO replacement

Algorithm and a page size of 200 words.

 

d.)  What do your results indicator ''Can you make any general statements about

what happens when page sizes are halved or doubled?

 

e.)  Are there any overriding advantages in using smaller pages?  What are the

offsetting factors? Remember that transferring 200 words of information

takes less than twice as long as transferring 100 words because of the

way secondary storage devices operate (the transfer rate is higher than the

access, or search/find, rate).

 

f.)  Repeat (a) through (c) above, using a main memory of 400 words. The size

of each page frame will again correspond to the size of the page.

 

g.)  What happened when more memory was given to the program? Can you

make some general statements about this occurrence? What changes might

you expect to see if the request list was much longer, as it would be in real life?

     .

 

h.)  Could this request list happen during the execution of a real program?

Explain.

 

 

 

i.)  Would you expect the success rate of an actual program under similar

conditions to be higher or lower than the one in this problem?

 

Using the programming environment of your choice, (OS, language, etc.), please do the assignment above.  Please submit all files via the submission folder provided.

Expert Solution
Step 1: Solution

Solution:

The problem is related to demand paging, where the demand for a particular memory page is fulfilled only when a page fault occurs. The goal is to calculate the success frequency of the page requests for different page sizes, using a FIFO replacement algorithm.

a) Using a FIFO replacement algorithm and a page size of 100 words, there are 2 page frames available for this program. Calculating the page numbers for each request, we get:

  • Request 10: Page 0
  • Request 11: Page 0 (page already in memory)
  • Request 104: Page 1
  • Request 170: Page 1 (page already in memory)
  • Request 73: Page 0 (page already in memory, page 1 gets replaced)
  • Request 309: Page 3
  • Request 185: Page 1 (page already in memory, page 0 gets replaced)
  • Request 245: Page 2
  • Request 246: Page 2 (page already in memory)
  • Request 434: Page 4
  • Request 458: Page 4 (page already in memory)
  • Request 364: Page 3 (page already in memory, page 2 gets replaced)

The success frequency is 7 out of 12 requests or approximately 58.3%.

 

b) Using a FIFO replacement algorithm and a page size of 20 words, there are 23 page frames available for this program. Calculating the page numbers for each request, we get:

  • Request 10: Page 0
  • Request 11: Page 0 (page already in memory)
  • Request 104: Page 5
  • Request 170: Page 8
  • Request 73: Page 3
  • Request 309: Page 15
  • Request 185: Page 9
  • Request 245: Page 12
  • Request 246: Page 12 (page already in memory)
  • Request 434: Page 21
  • Request 458: Page 22
  • Request 364: Page 18

The success frequency is 3 out of 12 requests, or approximately 25%.

 

c) Using a FIFO replacement algorithm and a page size of 200 words, there is only 1 page frame available for this program. Calculating the page numbers for each request, we get:

  • Request 10: Page 0
  • Request 11: Page 0 (page already in memory)
  • Request 104: Page 0 (page already in memory)
  • Request 170: Page 0 (page already in memory)
  • Request 73: Page 0 (page already in memory)
  • Request 309: Page 1
  • Request 185: Page 0 (page already in memory)
  • Request 245: Page 1 (page already in memory)
  • Request 246: Page 1 (page already in memory)
  • Request 434: Page 2
  • Request 458: Page 2 (page already in memory)
  • Request 364: Page 1 (page already in memory, page 2 gets replaced)

The success frequency is 6 out of 12 requests or approximately 50%.

 

d) When the page size is halved, the number of pages in the program doubles, resulting in more page faults due to fewer pages being available in memory. Conversely, when the page size is doubled, the number of pages in the program halves, resulting in fewer page faults due to more pages being available in memory.

 

e) Smaller page sizes allow for more efficient use of memory, as only the necessary pages are loaded into memory rather than entire blocks of data. This can lead to less wasted memory and faster program execution times. However, smaller page sizes also increase the likelihood of page faults, which can decrease overall program performance.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education