Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(Due at beginning of class October 18 or before, 10 points Possible) (Ch. 6) Ass

ID: 3594872 • Letter: #

Question

(Due at beginning of class October 18 or before, 10 points Possible) (Ch. 6) Assume that a paged memory allocation system with a page size of 2,048 bytes and an identical page frame size is being used, and assuming the incoming data file is 10,992 bytes, calculate how many pages will be created by the file. Calculate the size of any resulting fragmentation. Explain whether this situation will result in internal fragmentation, external fragmentation, or both. 1. (Ch. 6) In a system using dynamic partitions the Primary Memory use is as shown below just before Job Q requests 25K of memory space. 2. a- lf First fit memory allocation is being used, i. What change would be made to Primary Memory Use when job Q is loaded? Indicate ii. the amount of external fragmentation remaining when job Q is loaded (in Kbytes) i. what change would be made to Primary Memory Use when job Q is loaded? Indicate i. the amount of external fragmentation remaining following the end of job Q (in with the starting point of job Q and b. If Best Fit memory allocation were being used, with the starting point of job Q and Kbytes) Primary memory First Fit Primary Memory Best Fit Operating System ob P Operating System ZOK 20K Job P S0K sox 60 60K Job N ob N 100K 150K Job O Job L Job L 200K

Explanation / Answer

1.

File size = 10992 bytes

page size = 2048 bytes

Number of pages = 10992 / 2048 = 5 pages 752 byte = 6 pages(almost) with internal fragmentation

2048 * 5 = 10240 bytes

10992 - 10240 = 752 bytes allocated in 6th page

2048 - 752 = 1296 bytes internal fragmentation

This is internal fragmentation as all the bytes in the 6th page are not used.

2. Job Q = 25K

a) First Fit

Operating System 0 20K  

Job P 50k

Job L

200K

Total External Fragmentation = 10 + 30 = 40KBytes

a) Best Fit

Operating System 0 20K  

Job P 50k

Job Q 175K

5 k internal Fragmentation

Job L

200K

Total External Fragmentation = 10 + 40 = 50 K

Operating System 0 20K  

Job P 50k

10k 60K Job N 100K Job Q 125 K 15k internal fragmentation 140 K Job O 150K 30k 180K

Job L

200K