![jamaiciaw6](/avatars/49706.jpg)
jamaiciaw6
27.11.2019 •
Computers and Technology
Write a program to compare the performance of the lru and the optimal page replacement algorithms. the program will take a reference string and the number of frames as inputs. assume the maximum length of a reference string is 20 and there are 5 diffent pages from page 1 to page 5. the reference string can be randomly generated and the number of frames is entered through the keyboard. for example, the system generates a reference string 2 1 3 4 5 2 3 and you enter the number of frames 3. compare the number of page faults generated by the optimal and lru algorithms. print out the page replacement process and you can see how lru differs from the optimal.
Solved
Show answers
More tips
- L Leisure and Entertainment How Many Seasons are There in the TV Show Interns?...
- S Sport When will the Biathlon World Championships 2011 take place in Khanty-Mansiysk? Answers to frequently asked questions...
- H Health and Medicine Trading Semen for Money: Where Can You Sell and Why Would You Want to?...
- F Food and Cooking Homemade French Fries: The Ultimate Guide...
- H Health and Medicine How to Increase Blood Pressure without Medication?...
- S Style and Beauty Choosing a Hair Straightener: Specific Criteria to Consider...
- F Food and Cooking How to Make Polendwitsa at Home?...
- S Science and Technology When do we change our clocks?...
- L Leisure and Entertainment What to Give a Girl on March 8?...
- F Family and Home Is it Worth Knowing the Gender of Your Child Before Birth?...
Answers on questions: Computers and Technology
- H History It s believed that the role of feasts in the ice age was to a. celebrate weddings. b. celebrate the resolution of serious conflicts. c. strengthen group ties. d. mark times...
- M Mathematics Será que alguien me puede ayudar gracias...
- M Mathematics What times what equals 12 but when added equals 13...
Ответ:
a) A lightly inflated balloon is placed in a freezer: the size will decrease.
b)if it was instead kept outside in the sun for some time: the size will increase.
Explanation:
a) When we keep an inflated balloon in a freezer, it means we are keeping the balloon at lower temperature. According to kinetic molecular theory, if we decrease the temperature of gas sample, the kinetic energy of molecules will decrease, and they will move less randomly. The space between them will decrease, and the volume of the gas will decrease. This makes the size of balloon to decrease.
b) in second case, if we keep it in sun, the temperature will increase. The increase in temperature will increase the kinetic energy of molecules and thus molecules will move more randomly. The space between them will increase, this will increase the volume.
In extreme case the balloon may burst even.