HI Marnus, for question 6 i don't think all the answer was straight out the book but you can get most of it from the part on fragmenation on pg 287. For question 5 i showed my working just like they do in the text book did ( fig 9.12 on pg 332 or fig 9.14 pg 333 or fig9.15 pg 334). i used a table , with 3 rows for the frames and a 4th row to show the page fault number (basically 1 on every fault so you jsut dont add one where there is no change to the frames, which happens when a character comes up which is already in one of the frames) That is the best way i thought to show each character going into the frames,
Do you know how to apply the different page algorithms or is this where you are stuck? these diagrams are the best way to see how the algoriths work, heres a summary but go folllow the explanations for these graphs step by step:
FIFO: Each character goes into frame, oldest character gets replaced first, every replacement counts as a pae fault. only when there comes a character that is already in a frame then no page fault occurs.
Optimum: characters go in again one by one, now instead of replacing the oldest charater you look ahead at whats coming up in the string, and replace the character in frame that is not going to reappear, or is going to reappear in the string the latest. ie if your frame has (2, 0 , 4) and the remainder of your string still needing to be read in is 1, 3, 0, 2, 7 you can see 0 is coming up soon, then 2 and 4 isn't coming up again . so you can replace 4.. then next to be replaced is 2, because 0 comes up again before 2...
LRU: here you replace the character thats was used the longest time ago. i think if i try explain this i might confuse you and myself. see if you get the first 2 right then try the LRU.