0% found this document useful (0 votes)
7 views2 pages

OS Assgn 3

The document outlines a memory allocation assignment that requires taking input on the status of main memory and a process size. It demonstrates three memory allocation techniques: First Fit, Best Fit, and Worst Fit, with examples of how memory is allocated and the updated memory status after allocation. The assignment is targeted at SE(C1/C2/C3) students.

Uploaded by

shubhambabutale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

OS Assgn 3

The document outlines a memory allocation assignment that requires taking input on the status of main memory and a process size. It demonstrates three memory allocation techniques: First Fit, Best Fit, and Worst Fit, with examples of how memory is allocated and the updated memory status after allocation. The assignment is targeted at SE(C1/C2/C3) students.

Uploaded by

shubhambabutale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

OS Assignment No –3

Memory Allocation Techniques

SE(C1/C2/C3)

Take as input the status of main memory, where in some regions are occupied and some are free.

Also take as input a process of a certain size.

Show which region of memory will be allocated to that process using

1. First fit
2. Best Fit
3. Worst Fit

Sr No Memory Status(free/Not Process


free)
1 100 KB NF P1
2 300 KB F
3 40 KB NF P2
4 50 KB F
5 150 KB NF P3
6 240 KB F
7 200 KB NF P4
8 400 KB F

Eg:

Consider input – P5 of size 200 KB

Output

First Fit- Memory block of 300 KB

Updated Memory Status

Sr No Memory Status(free/Not free) Process


1 100 KB NF P1
2 200 KB NF P5
3 100 KB F
4 40 KB NF P2
5 50 KB F
6 150 KB NF P3
7 240 KB F
8 200 KB NF P4
9 400 KB F
Best Fit- Memory block of 240 KB

Updated Memory Status

Sr. No Memory Status(free/Not Process


free)
1 100 KB NF P1
2 300 KB F
3 40 KB NF P2
4 50 KB F
5 150 KB NF P3
6 200 KB NF P5
7 40 KB F
8 200 KB NF P4
9 400 KB F

Worst Fit - Memory block of 400 KB

Updated Memory Status

Sr No Memory Status(free/Not free) Process


1 100 KB NF P1
2 300 KB F
3 40 KB NF P2
4 50 KB F
5 150 KB NF P3
6 240 KB F
7 200 KB NF P4
8 200 KB NF P5
9 200 KB F

You might also like