Friday, January 15, 2010

Exercise 1

1.        Given the following information:

 

 

 

Job List:

 

 

 

                Job Number                            Memory Requested

 

               

 

                      J1                                                       700k

 

                      J2                                                       500k

 

                      J3                                                       740k

 

 

 

Memory List:

 

 

 

                Memory Block                                       Size

 

 

 

                Block 1                                                    610k

 

                Block 2                                                    850k

 

                Block 3                                                    700k

 

 

 

 

 

 

 

 

 

 

 

A.       Use the best-fit algorithm to allocate the memory blocks

 

to three arriving jobs.

 

Memory Block

Memory  Block Size

Job Number

Job Size

Status

Internal Fragmentation

Block 1

650K

J2

500K

Busy

150K

Block 2

850K

J1

740K

Busy

110K

Block 3

700K

J3

700

Busy

0

Total Available:

2200K

Total Used:

1940K

Busy

260K

 

 

 

B.       Use the first-fit algorithm to allocate the memory blocks

 

to three arriving jobs.

 

 

Memory Block

Memory  Block Size

Job Number

Job Size

Status

Internal Fragmentation

Block 1

650K

J2

500K

Busy

150K

Block 2

850K

J1

740K

Busy

110K

Block 3

700K

J3

700

Busy

0

Total Available:

2200K

Total Used:

1940K

Busy

260K

 

  

 

No comments:

Post a Comment