hw5 - approach shown in class. Note that the page size is...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CPSC435 (W2008) Operating Systems Answer Key for Assignment 5 1. Given the following information: Job list: job number memory requested J1 700K J2 500K J3 740K Memory list: memory block block size Block 1 610K Block 2 850K Block 3 700K (a) Use the first-fit algorithm to allocate the memory blocks to the three arriving jobs. J1: Block 2 J2: Block 1 J3: waits (b) Use the best-fit algorithm to allocate the memory blocks to the three arriving jobs. J1: Block 3 J2: Block 1 J3: Block 2 (c) Use the worst-fit algorithm to allocate the memory blocks to the three arriving jobs. J1: Block 2 J2: Block 3 J3: waits We assume static partitioning is used to solve the problem for (a), (b), and (c) above. 2. Suppose byte 27 10 is referenced in a program running on a paging system. Determine the page number (p) and displacement (d) for the byte using the formula
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: approach shown in class. Note that the page size is 10 bytes. p = 27/10 = 2 d = 27%10 = 7 3. What is the physical address in memory for the byte shown in Problem 2 above if the page containing the byte is stored in frame 5? physical address = 510 + 7 = 57 4. Suppose the page size is changed to 16 bytes and the virtual address space for the program is 64 bytes. Determine the page number (p) and displacement (d) for byte 17 using the format approach shown in class. 64 = 2 6 , so a total of 6 bits is used for address space 16 = 2 4 , so 4 bits are used for offset and 2 bits are used for page number 17 10 = 010001 2 , so p = 01 2 = 1 10 and d = 0001 2 = 1 10...
View Full Document

Page1 / 2

hw5 - approach shown in class. Note that the page size is...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online