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

Page 5 of 5 s. Consider a swapping system in which memory consists of the holes

ID: 3725308 • Letter: P

Question

Page 5 of 5 s. Consider a swapping system in which memory consists of the holes as shown in Fig. 1. Note that in memory, and Hi to Hs are eight holes. Process Pl, P2, and P3 are generated sequentially. Whic P1, P2, and P3, respectively, when the first fit algorithm is used? Put your answer in Table 2. 1, Note thsat A to I repre pros hole is taken for the process i· ii. iii. iv. v. P:requests 8 KB. P: requests 10KB. P, requests 13KB. P‘ requests 5KB Ps requests 4KB Now repeat the question for best fit, worst fit, and next fit algorithm. I Hs Hi 4KB A Hs 13KB 16KB 9KB Fig. 1 Table 2: He H7 Hs Hi H2 Ha First fit Best fit Worst fit Next fit

Explanation / Answer

H1

(4KB)

H2

(10KB)

H3

(5KB)

H4

(16KB)

H5

(8KB)

H6

(9KB)

H7

(15KB)

H8

(13KB)

NEXT FIT

P1

(8KB)

P2

(10KB)

P3

(13KB)

P4(5KB)

P5(4KB)

BEST FIT

P5

(4KB)

P2

(10KB)

P4

(5KB)

P1

(8KB)

P3

(13KB)

WORST FIT

P1

(8KB)

P3

(13KB)

P4

(5KB)

P5

(4KB)

P2

(10KB)

FIRST FIT

P5

(4KB)

P1

(8KB)

P4

(5KB)

P2

(10KB)

P3

(13KB)

Processes are: - P1 (8KB), P2 (10KB), P3 (13KB), P4 (5KB), and P5 (4KB)

H1

(4KB)

H2

(10KB)

H3

(5KB)

H4

(16KB)

H5

(8KB)

H6

(9KB)

H7

(15KB)

H8

(13KB)

NEXT FIT

P1

(8KB)

P2

(10KB)

P3

(13KB)

P4(5KB)

P5(4KB)

BEST FIT

P5

(4KB)

P2

(10KB)

P4

(5KB)

P1

(8KB)

P3

(13KB)

WORST FIT

P1

(8KB)

P3

(13KB)

P4

(5KB)

P5

(4KB)

P2

(10KB)

FIRST FIT

P5

(4KB)

P1

(8KB)

P4

(5KB)

P2

(10KB)

P3

(13KB)