0% found this document useful (0 votes)
42 views6 pages

Matthew Williams Group Project

Deallocation refers to freeing allocated resources like memory, devices, or files. It is important for operating systems to prevent slowdowns from excessive memory allocation. Deallocation handles memory no longer needed and can cause external fragmentation. It works differently based on fixed or dynamic partition systems. In fixed systems, memory status simply changes from busy to free. Dynamic systems must combine free areas and handle three cases: adjacent free blocks combining, blocks between two free areas combining, and isolated blocks adding to the free list. Tables show examples of the deallocation algorithms in dynamic systems.

Uploaded by

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

Matthew Williams Group Project

Deallocation refers to freeing allocated resources like memory, devices, or files. It is important for operating systems to prevent slowdowns from excessive memory allocation. Deallocation handles memory no longer needed and can cause external fragmentation. It works differently based on fixed or dynamic partition systems. In fixed systems, memory status simply changes from busy to free. Dynamic systems must combine free areas and handle three cases: adjacent free blocks combining, blocks between two free areas combining, and isolated blocks adding to the free list. Tables show examples of the deallocation algorithms in dynamic systems.

Uploaded by

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

Deallocation is referred to as “the process of freeing an allocated resource, whether

memory space, a device, a file or a CPU” as stated by Ann McIver McHoes and Ida M. Flynn in

their book “Understanding Operating Systems” (McHoes & Flynn, 2018, p. 72). Thus this

process can be referred to as the problem solver to issues which occur when too many memory

blocks are allocated, which can in turn cause the operating system to run slower. But also as

mentioned by McHoes and Flynn deallocation and cause external fragmentation (McHoes &

Flynn, 2018, p. 41). External fragmentation is referred to as a process when “the subsequent

allocation of memory creates fragments of free memory between partitions of allocated memory”

as stated by McHoes and Flynn (McHoes & Flynn, 2018, p. 34). Despite this disadvantage for

deallocation it is still an important aspect of the operating systems it is involved in as it reassign

memory that is no longer need by another job, and it is essential for system resources like

devices, files, and even network access. Deallocation works differently depending on the

partition system as it is simpler for fixed partition systems

In fixed partition systems deallocation is a simpler process, as discussed by McHoes and

Flynn, what occurs in this scenario is that when a job is completed the Memory Manager will

immediately deallocate the memory space by changing its status. The entire memory block will

turn from “busy” to “free” (McHoes & Flynn, 2018, p. 41). In these scenarios 1 indicates that the

memory block is busy whereas a 0 indicates that the memory block is free. Considering this in

comparison to the dynamic partition system this system (fixed partition system) is simpler.

In the case of dynamic partition system has a more complex algorithm in comparison to

fixed partition systems. This is because this method tries to combine free areas of memory

whenever it is possible to. Thus, the system has to be prepared for three alternative situations

which are as follows as stated by McHoes and Flynn:


a) When the block to be deallocated is adjacent to another free block.

b) When the block to be deallocated is between two free blocks.

c) When the block to be deallocated is isolated from other free blocks. (McHoes & Flynn,

2018, p. 41)

Each alternative as mentioned in a, b and c is different and thus deallocation happens differently

in each case.

In case A the table (Table 1) below provided by McHoes and Flynn shows how the

deallocation process occurs in the dynamic memory allocation system when the job has to be

deallocated is next to one free memory block the following table (Table 2) shows how the free

list looks.

Table 1

Table 2 (McHoes & Flynn, 2018, pp. 41-42)


As shown in these tables the deallocation algorithm the system will understand and recognize

that memory has to be released next to a free memory block. In this case the locations starts at

7800. Afterwards the list has to change its address to reflect a new free block being created

which becomes 7600 and the block size of the new space must change to show the new size. As a

result, the two free partitions will combine as shown in Table 2.

In case B, the table (Table 3) below provided by McHoes and Flynn shows how the

memory space that has to be deallocated is between two free memory blocks thus the process

here is similar to the one previously mentioned in case A.

Table 3

Table 4 (McHoes & Flynn, 2018, pp. 42-43)


As shown in these tables the algorithm will understand that the memory that needs to be

deallocated is between two free blocks thus the size of the three partitions will need to be

combined. Afterwards the total will be stored at the smallest beginning address which in this case

is 7560. The reason for this is because the other entries have been combing with the beginning

one, following the entry must have it’s status changed to null entry, with no memory block and

no beginning address which is shown in Table 4 with an asterisk.

In the last case, Case C the table (Table 5) below provided by McHoes and Flynn shows

how in this case the space which is required to be deallocated is isolated from all other free areas.

Table 5

Table 6 (McHoes & Flynn, 2018, pp. 43-44)

The deallocation algorithm in this method will understand that the memory which needs to be

released isn’t adjacent to a free block but instead is between two other busy areas. Thus, the

system will search for a null entry in the table. As shown in the table below (Table 7) a null entry
is created between two other busy memory blocks and is returned to the free list. This happens to

ensure that the blocks are entered into the list according to the beginning of their memory

location (this is done from smallest to largest).

Table 7 (McHoes & Flynn, 2018, p. 44)

Following the null entry be found the beginning memory location of the job which is be

terminated is entered in the begging address column, the job size is then entered under the

memory block size column and its status will be updated to free from null entry to indicate that

the block of memory is available. This is shown in Table 8

Table 8 (McHoes & Flynn, 2018, p. 44)


References
McHoes, A. M., & Flynn, M. I. (2018). Understanding Operating Systems (Vol. Eight). Boston,
Massachusetts, United States of America: Cengage Learning.

You might also like