SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
International Journal of Trend in Scientific Research and Development (IJTSRD)
Volume 3 Issue 5, August 2019 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470
@ IJTSRD | Unique Paper ID – IJTSRD26731 | Volume – 3 | Issue – 5 | July - August 2019 Page 1985
Analysis of Allocation Algorithms in Memory Management
Lae Wah Htun1, Moh Moh Myint Kay1, Aye Aye Cho2
1Assistant Lecturer, 2Associate Professor
1,2University of Computer Studies, Hinthada, Myanmar
How to cite this paper: Lae Wah Htun |
Moh Moh Myint Kay | Aye Aye Cho
"Analysis of Allocation Algorithms in
Memory Management" Published in
International
Journal of Trend in
Scientific Research
and Development
(ijtsrd), ISSN: 2456-
6470, Volume-3 |
Issue-5, August
2019, pp.1985-
1987,
https://doi.org/10.31142/ijtsrd26731
Copyright © 2019 by author(s) and
International Journal ofTrend inScientific
Research and Development Journal. This
is an Open Access article distributed
under the terms of
the Creative
Commons Attribution
License (CC BY 4.0)
(http://creativecommons.org/licenses/by
/4.0)
ABSTRACT
Memory management is the process of controllingand coordinatingcomputer
memory, assigning portions called blocks to various running programs to
optimize overall system performance and also known as memory allocation.
Placement algorithms are implemented to determine the slot that can be
allocated process amongst the available ones in the partitioned memory.
Memory slots allocated to processes might be too big when using the existing
placement algorithms hence losinga lotofspaceduetointernalfragmentation.
In dynamic partitioning, external fragmentation occurs when there is a
sufficient amount of space in the memory to satisfy the memory request of a
process but the process’s memory request cannot be satisfied as the memory
available is in a non-contiguous manner. This paper describes how to resolve
external fragmentationusing threeallocationalgorithms. Thesealgorithms are
First-fit, Best-fit and Worst-fit. We will present the implementation of three
algorithms and compare their performance on generated virtual trace.
KEYWORDS: Best-fit, First-fit, Worst-fit, Performance, Memory Management
1. Introduction
Memory Management is the function responsible for allocating and managing
computer’s main Memory. Different memory allocation algorithms have been
devised to organize memory efficiently. Allocationalgorithms areimplemented
to determine the slot that can be allocated a process amongsttheavailableones
in the partitioned memory block. Allocating a single contiguous section of
memory to each process is the most primitive methodof memorymanagement,
usually called partitioning.
In partitioning, the simplest partitioning method is dividing
memory into several fixed-sized partitions inadvance,called
fixed partitioning. Fixed partitioning is the oldest and
simplest technique used to put more than one processes in
the main memory. In fixed partitioning, there are two
methods: equal-sized partitioning and unequal-sized
partitioning. In equal-sized partitioning, any process whose
size is less than or equal to the partition size can be loaded
into any available partition. Fixed size partitions sufferfrom
two types of problems; they are overlays and internal
fragmentation.
If a process is larger than the size of the partition then it
suffers from overlaying problem in which only required
information will be kept in memory. Overlays are extremely
complex and time consuming task. When the memory
assigned to the process is slightly larger than the memory
requested by the process this creates free space in the
allocated causing internal fragmentation. It occurs when
fixed sized memory blocks are allocated to the processes.
In multiple queues, each process is assigned to the smallest
partition in which it fits and minimizes the internal
fragmentation problem. In single queue, the process is
assigned to the smallest available partition and the level of
multiprogramming is increased the size of each block in
fixed partition is varied where processes are assigned to the
blocks where it fits exactly: inotherwords,processesmaybe
queued to use the best available partition. In the unequal
size partition compared to equal size partition, memory
wastage is minimized, and may not give best throughput as
some partitions may be unused. The unequal size partitions
use two types of queues where processes are assigned to
memory blocks. They are multiple queue and single queue.
In multiple queues, each process is assigned to the smallest
partition in which it fits and minimizes the internal
fragmentation problem. In single queue, the process is
assigned to the smallest available partition and the level of
multiprogramming is increased. If process loaded is much
smaller than any partition either equal or unequal, then it
suffers from internal fragmentation in which memory is not
used efficiently. To overcome this problem, an approach
known as dynamic partitioning was developed. Partitioning
may be done dynamically, called dynamic partitioning. In
dynamic partitioning, external fragmentation occurs when
there is a sufficient amount of space in the memory tosatisfy
the memory request of a process but the process’s memory
request cannot be satisfied as the memory available is in a
non-contiguous manner. A method for overcoming external
fragmentation is compaction. The difficultywithcompaction
is that it is a time-consuming and requires relocation
capability. Therefore, different strategies may be taken as to
how space is allocated to processes: the common placement
algorithms are Firs-fit, Best-fit and Worst-fit.
2. Background of Theory
Modern operating systems provide efficient memory
management and still research is being conduct to improve
IJTSRD26731
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD26731 | Volume – 3 | Issue – 5 | July - August 2019 Page 1986
the way the memory is allocated forapplications becausethe
main problem faces by memory allocation algorithms is to
efficiently allocating the demanded memory blocks to the
demanding applications with the minimum response time
along with minimum memory loss in the shapeoftraditional
memory loss problem called the fragmentation of memory.
We will use the placement algorithm to efficiently allocate
the processes in the main memory.
A. First-fit
In First-fit, scan the memory from the beginningandallocate
the first available block that is large enough. It is one of the
fastest algorithms as it would search only as little as
possible. But, the remaining unused memory areas left after
allocations become waste if it is toosmaller.Thus requestfor
large memory requirement cannot be accomplished.Wewill
prove that the following problem, which algorithm makes
the most efficient use of memory.
Implementation in First-fit:
1. Input memory blocks with size and processes with size.
2. Initialize all memory blocks as free.
3. Start by picking each process and check if it can be
assigned to current block.
4. If size-of-process <= size-of-block if yes then assign and
check for next process
5. If not then keep checking the further blocks.
For example: Given ten memory partitions of500KB,200KB,
800KB, 400KB, 100KB, 700KB, 300KB, 600KB, 1000KB,
900KB (in order), How would the First-fit, Best-fit, Worst- fit
algorithms place processes of212KB,150KB,375KB,950KB,
350KB, 632KB, 400KB, 717KB, 811KB (in order)? Which
algorithm makes the most efficient use of memory?
In First-fit:
212KB is put in 500KB partition
150KB is put in 288KB (new partition 288KB=500KB-
212KB)
375KB is put in 800KB partition
950KB is put in 1000KB partition
350KB is put in 425KB(new partition425KB=800KB-375KB
632KB is put in 700KB partition
400KB is put in 400KB partition
717KB is put in 900KB partition
811 must wait
Figure1. First-fit Output results
B. Best-fit
In Best-fit, the entire list of blocks must be searched the
closest in size to the request and allocate this block.Memory
utilization is much better than First-fit as it searches the
smallest free partition first available. But, it is slower and
may even tend to fill up memory with tiny useless holes.
Implementation in Best-fit:
1. Input memory blocks with size and processes with size.
2. Initialize all memory blocks as free.
3. Start by picking each process and find the minimum
block size that can be assigned to current process i.e.,
find min(blockSize[1]),blockSize[2],………,blockSize[n]>
processSize[current] it found then assign it to the
current process.
4. If not then leave that process and keep checking the
further processes.
Calculation with Best-fit, above the problem describes in
First-fit
In Best-fit:
212KB is put in 300KB partition
150KB is put in 200KB partition
375KB is put in 400KB partition
950KB is put in 1000KB partition
350KB is put in 500KB partition
632KB is put in 700KB partition
400KB is put in 600KB partition
717KB is put in 800KB partition
811KB is put in 900KB partition
Figure2. Best-fit Output results
C. Worst-fit
In Worst-fit, the entire list of blocks must be searched the
largest block and allocate this block. Reduce the rate of
production of small gaps. In contrast, this strategy produces
the largest leftover block, which may be big enough to hold
another process. But, if a process requiring larger memory
arrives at a later stage then it cannot be accommodated as
the largest hole is already split and occupied.
Implementation in Worst-fit:
1. Input memory blocks with size and processes with size.
2. Initialize all memory blocks as free.
3. Start by picking each process and find the maximum
block size that can be assigned to current process i.e.,
find max (blockSize[1]), blockSize[2],…….,blockSize[n]>
processSize[current] it found then assign it to the
current process.
4. If not then leave that process and keep checking the
further processes.
Calculation with Worst-fit, above the problem describes in
First-fit
In Worst-fit:
212KB is put in 1000KB partition
150KB is put in 900KB partition
375KB is put in 800KB partition
950KB must wait
350KB is put in 788KB (new partition 788KB=1000KB-
212KB)
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD26731 | Volume – 3 | Issue – 5 | July - August 2019 Page 1987
632KB is put in 750KB (new partition 750KB=900KB-
150KB)
400KB is put in 700KB partition
717KB must wait
811KB must wait
Figure3. Worst-fit Output results
3. Experimental Results
In this paper, we have been seen that Best-fit algorithm is
the best among three placement algorithms. We are
explained with a problem, how to calculate this algorithm.
These algorithms cannot eliminate external fragmentation.
To overcome this problem, we must use compaction.
Figure4. Comparison of Three Allocation Algorithms for
Performance
4. Conclusion
Main memory management is very important in operating
system. Simulations have shown that both First-fit and Best-
fit are better than Worst-fit in terms of decreasing both time
and storage utilization. Neither First-fit norBest-fitis clearly
better in terms of storage utilization but First-fit is generally
faster. Among three algorithms, Best-fitalgorithmmakes the
most efficient use of memory. In this paper, we also proved
that Best-fit algorithm is the best in memory utilization.
References
[1] Rachael Chikorrie, Okuthe P. Kogeda, Manoj Lall: “An
Optimized Main Memory Management Partitioning
Placement Algorithm”, Pan African conference on
Science, computing and Telecommunications (PACT)
Publisher, July 27-29, Kampala Uganda 2015.
[2] Abraham Silerschatz, Peter Beer Galvin, and Greg
Gange, “Operating System Concepts”, John Wiley &
Sons, INC., January 1, 2002.
[3] William Stallings, “Operating System Internals and
Design Principles”, March 20, 2017.
[4] Ledisi G. Kabari, TamunoomieS. Gogo, ”Efficiency of
Memory Allocation Algorithms Using Mathematical
Model”, International Journal of Emerging Engineering
Research and Technology Volume 3, Issue 9,
September, 2015, PP 55-67
[5] Muhammand Abfullh Awais, “Challenges and
Techniques for Algorithms in Relation with Today’s
Real Time Needs”, International journal of Multi-
Disciplinary Sciences and Engineering, vol.7, No.3,
March 2016.

Mais conteúdo relacionado

Mais procurados (20)

Circular queues
Circular queuesCircular queues
Circular queues
 
Data Structure and Algorithms Linked List
Data Structure and Algorithms Linked ListData Structure and Algorithms Linked List
Data Structure and Algorithms Linked List
 
Relational model
Relational modelRelational model
Relational model
 
Trees.pptx
Trees.pptxTrees.pptx
Trees.pptx
 
PAC
PACPAC
PAC
 
advanced sql(database)
advanced sql(database)advanced sql(database)
advanced sql(database)
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
 
Turing machine-TOC
Turing machine-TOCTuring machine-TOC
Turing machine-TOC
 
Normalization
NormalizationNormalization
Normalization
 
Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
 
data Normalization.pdf
data Normalization.pdfdata Normalization.pdf
data Normalization.pdf
 
03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf
 
DBMS Unit 2 ppt.ppt
DBMS Unit 2 ppt.pptDBMS Unit 2 ppt.ppt
DBMS Unit 2 ppt.ppt
 
DBMS Canonical cover
DBMS Canonical coverDBMS Canonical cover
DBMS Canonical cover
 
Skip lists (Advance Data structure)
Skip lists (Advance Data structure)Skip lists (Advance Data structure)
Skip lists (Advance Data structure)
 
Dbms schema &amp; instance
Dbms schema &amp; instanceDbms schema &amp; instance
Dbms schema &amp; instance
 
StructuresPointers.pptx
StructuresPointers.pptxStructuresPointers.pptx
StructuresPointers.pptx
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Anomalies in database
Anomalies in databaseAnomalies in database
Anomalies in database
 
process control block
process control blockprocess control block
process control block
 

Semelhante a Analysis of Allocation Algorithms in Memory Management

local_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxlocal_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxLyn B
 
DB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDBharathi8
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSKumar Pritam
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptxRajapriya82
 
conviction in operating system
conviction in operating systemconviction in operating system
conviction in operating systemADITHYAM19
 
Design and Implementation of Repair-aware Test Flow for Multi-Memory
Design and Implementation of Repair-aware Test Flow for Multi-MemoryDesign and Implementation of Repair-aware Test Flow for Multi-Memory
Design and Implementation of Repair-aware Test Flow for Multi-Memoryijcsit
 
Efficient usage of memory management in big data using “anti caching”
Efficient usage of memory management in big data using “anti caching”Efficient usage of memory management in big data using “anti caching”
Efficient usage of memory management in big data using “anti caching”eSAT Journals
 
Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...ijesajournal
 
Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...ijesajournal
 
Architecture and implementation issues of multi core processors and caching –...
Architecture and implementation issues of multi core processors and caching –...Architecture and implementation issues of multi core processors and caching –...
Architecture and implementation issues of multi core processors and caching –...eSAT Publishing House
 
I-Sieve: An inline High Performance Deduplication System Used in cloud storage
I-Sieve: An inline High Performance Deduplication System Used in cloud storageI-Sieve: An inline High Performance Deduplication System Used in cloud storage
I-Sieve: An inline High Performance Deduplication System Used in cloud storageredpel dot com
 
Memory Management in Operating System
Memory Management in Operating SystemMemory Management in Operating System
Memory Management in Operating Systemijtsrd
 
Fixed partitioning of memory
Fixed partitioning of memoryFixed partitioning of memory
Fixed partitioning of memoryJohn Scott Giini
 
Query optimization
Query optimizationQuery optimization
Query optimizationPooja Dixit
 
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURESREDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURESijcsit
 
Reducing Competitive Cache Misses in Modern Processor Architectures
Reducing Competitive Cache Misses in Modern Processor ArchitecturesReducing Competitive Cache Misses in Modern Processor Architectures
Reducing Competitive Cache Misses in Modern Processor ArchitecturesAIRCC Publishing Corporation
 
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURESREDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURESijcsit
 

Semelhante a Analysis of Allocation Algorithms in Memory Management (20)

local_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxlocal_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptx
 
DB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdf
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
conviction in operating system
conviction in operating systemconviction in operating system
conviction in operating system
 
Design and Implementation of Repair-aware Test Flow for Multi-Memory
Design and Implementation of Repair-aware Test Flow for Multi-MemoryDesign and Implementation of Repair-aware Test Flow for Multi-Memory
Design and Implementation of Repair-aware Test Flow for Multi-Memory
 
Efficient usage of memory management in big data using “anti caching”
Efficient usage of memory management in big data using “anti caching”Efficient usage of memory management in big data using “anti caching”
Efficient usage of memory management in big data using “anti caching”
 
Dynamic loading
Dynamic loadingDynamic loading
Dynamic loading
 
Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...
 
Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...Dominant block guided optimal cache size estimation to maximize ipc of embedd...
Dominant block guided optimal cache size estimation to maximize ipc of embedd...
 
Architecture and implementation issues of multi core processors and caching –...
Architecture and implementation issues of multi core processors and caching –...Architecture and implementation issues of multi core processors and caching –...
Architecture and implementation issues of multi core processors and caching –...
 
I-Sieve: An inline High Performance Deduplication System Used in cloud storage
I-Sieve: An inline High Performance Deduplication System Used in cloud storageI-Sieve: An inline High Performance Deduplication System Used in cloud storage
I-Sieve: An inline High Performance Deduplication System Used in cloud storage
 
Memory Management in Operating System
Memory Management in Operating SystemMemory Management in Operating System
Memory Management in Operating System
 
Fixed partitioning of memory
Fixed partitioning of memoryFixed partitioning of memory
Fixed partitioning of memory
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
OS Unit 2.pptx
OS Unit 2.pptxOS Unit 2.pptx
OS Unit 2.pptx
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURESREDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
 
Reducing Competitive Cache Misses in Modern Processor Architectures
Reducing Competitive Cache Misses in Modern Processor ArchitecturesReducing Competitive Cache Misses in Modern Processor Architectures
Reducing Competitive Cache Misses in Modern Processor Architectures
 
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURESREDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
REDUCING COMPETITIVE CACHE MISSES IN MODERN PROCESSOR ARCHITECTURES
 

Mais de ijtsrd

‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementation‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementationijtsrd
 
Edge Computing in Space Enhancing Data Processing and Communication for Space...
Edge Computing in Space Enhancing Data Processing and Communication for Space...Edge Computing in Space Enhancing Data Processing and Communication for Space...
Edge Computing in Space Enhancing Data Processing and Communication for Space...ijtsrd
 
Dynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and ProspectsDynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and Prospectsijtsrd
 
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...ijtsrd
 
The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...ijtsrd
 
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...ijtsrd
 
Problems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A StudyProblems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A Studyijtsrd
 
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...ijtsrd
 
The Impact of Educational Background and Professional Training on Human Right...
The Impact of Educational Background and Professional Training on Human Right...The Impact of Educational Background and Professional Training on Human Right...
The Impact of Educational Background and Professional Training on Human Right...ijtsrd
 
A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...ijtsrd
 
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...ijtsrd
 
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...ijtsrd
 
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. SadikuSustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadikuijtsrd
 
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...ijtsrd
 
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...ijtsrd
 
Activating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment MapActivating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment Mapijtsrd
 
Educational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger SocietyEducational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger Societyijtsrd
 
Integration of Indian Indigenous Knowledge System in Management Prospects and...
Integration of Indian Indigenous Knowledge System in Management Prospects and...Integration of Indian Indigenous Knowledge System in Management Prospects and...
Integration of Indian Indigenous Knowledge System in Management Prospects and...ijtsrd
 
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...ijtsrd
 
Streamlining Data Collection eCRF Design and Machine Learning
Streamlining Data Collection eCRF Design and Machine LearningStreamlining Data Collection eCRF Design and Machine Learning
Streamlining Data Collection eCRF Design and Machine Learningijtsrd
 

Mais de ijtsrd (20)

‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementation‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementation
 
Edge Computing in Space Enhancing Data Processing and Communication for Space...
Edge Computing in Space Enhancing Data Processing and Communication for Space...Edge Computing in Space Enhancing Data Processing and Communication for Space...
Edge Computing in Space Enhancing Data Processing and Communication for Space...
 
Dynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and ProspectsDynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and Prospects
 
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
 
The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...
 
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
 
Problems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A StudyProblems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A Study
 
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
 
The Impact of Educational Background and Professional Training on Human Right...
The Impact of Educational Background and Professional Training on Human Right...The Impact of Educational Background and Professional Training on Human Right...
The Impact of Educational Background and Professional Training on Human Right...
 
A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...
 
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
 
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
 
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. SadikuSustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
 
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
 
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
 
Activating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment MapActivating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment Map
 
Educational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger SocietyEducational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger Society
 
Integration of Indian Indigenous Knowledge System in Management Prospects and...
Integration of Indian Indigenous Knowledge System in Management Prospects and...Integration of Indian Indigenous Knowledge System in Management Prospects and...
Integration of Indian Indigenous Knowledge System in Management Prospects and...
 
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
 
Streamlining Data Collection eCRF Design and Machine Learning
Streamlining Data Collection eCRF Design and Machine LearningStreamlining Data Collection eCRF Design and Machine Learning
Streamlining Data Collection eCRF Design and Machine Learning
 

Último

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Último (20)

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Analysis of Allocation Algorithms in Memory Management

  • 1. International Journal of Trend in Scientific Research and Development (IJTSRD) Volume 3 Issue 5, August 2019 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470 @ IJTSRD | Unique Paper ID – IJTSRD26731 | Volume – 3 | Issue – 5 | July - August 2019 Page 1985 Analysis of Allocation Algorithms in Memory Management Lae Wah Htun1, Moh Moh Myint Kay1, Aye Aye Cho2 1Assistant Lecturer, 2Associate Professor 1,2University of Computer Studies, Hinthada, Myanmar How to cite this paper: Lae Wah Htun | Moh Moh Myint Kay | Aye Aye Cho "Analysis of Allocation Algorithms in Memory Management" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456- 6470, Volume-3 | Issue-5, August 2019, pp.1985- 1987, https://doi.org/10.31142/ijtsrd26731 Copyright © 2019 by author(s) and International Journal ofTrend inScientific Research and Development Journal. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (CC BY 4.0) (http://creativecommons.org/licenses/by /4.0) ABSTRACT Memory management is the process of controllingand coordinatingcomputer memory, assigning portions called blocks to various running programs to optimize overall system performance and also known as memory allocation. Placement algorithms are implemented to determine the slot that can be allocated process amongst the available ones in the partitioned memory. Memory slots allocated to processes might be too big when using the existing placement algorithms hence losinga lotofspaceduetointernalfragmentation. In dynamic partitioning, external fragmentation occurs when there is a sufficient amount of space in the memory to satisfy the memory request of a process but the process’s memory request cannot be satisfied as the memory available is in a non-contiguous manner. This paper describes how to resolve external fragmentationusing threeallocationalgorithms. Thesealgorithms are First-fit, Best-fit and Worst-fit. We will present the implementation of three algorithms and compare their performance on generated virtual trace. KEYWORDS: Best-fit, First-fit, Worst-fit, Performance, Memory Management 1. Introduction Memory Management is the function responsible for allocating and managing computer’s main Memory. Different memory allocation algorithms have been devised to organize memory efficiently. Allocationalgorithms areimplemented to determine the slot that can be allocated a process amongsttheavailableones in the partitioned memory block. Allocating a single contiguous section of memory to each process is the most primitive methodof memorymanagement, usually called partitioning. In partitioning, the simplest partitioning method is dividing memory into several fixed-sized partitions inadvance,called fixed partitioning. Fixed partitioning is the oldest and simplest technique used to put more than one processes in the main memory. In fixed partitioning, there are two methods: equal-sized partitioning and unequal-sized partitioning. In equal-sized partitioning, any process whose size is less than or equal to the partition size can be loaded into any available partition. Fixed size partitions sufferfrom two types of problems; they are overlays and internal fragmentation. If a process is larger than the size of the partition then it suffers from overlaying problem in which only required information will be kept in memory. Overlays are extremely complex and time consuming task. When the memory assigned to the process is slightly larger than the memory requested by the process this creates free space in the allocated causing internal fragmentation. It occurs when fixed sized memory blocks are allocated to the processes. In multiple queues, each process is assigned to the smallest partition in which it fits and minimizes the internal fragmentation problem. In single queue, the process is assigned to the smallest available partition and the level of multiprogramming is increased the size of each block in fixed partition is varied where processes are assigned to the blocks where it fits exactly: inotherwords,processesmaybe queued to use the best available partition. In the unequal size partition compared to equal size partition, memory wastage is minimized, and may not give best throughput as some partitions may be unused. The unequal size partitions use two types of queues where processes are assigned to memory blocks. They are multiple queue and single queue. In multiple queues, each process is assigned to the smallest partition in which it fits and minimizes the internal fragmentation problem. In single queue, the process is assigned to the smallest available partition and the level of multiprogramming is increased. If process loaded is much smaller than any partition either equal or unequal, then it suffers from internal fragmentation in which memory is not used efficiently. To overcome this problem, an approach known as dynamic partitioning was developed. Partitioning may be done dynamically, called dynamic partitioning. In dynamic partitioning, external fragmentation occurs when there is a sufficient amount of space in the memory tosatisfy the memory request of a process but the process’s memory request cannot be satisfied as the memory available is in a non-contiguous manner. A method for overcoming external fragmentation is compaction. The difficultywithcompaction is that it is a time-consuming and requires relocation capability. Therefore, different strategies may be taken as to how space is allocated to processes: the common placement algorithms are Firs-fit, Best-fit and Worst-fit. 2. Background of Theory Modern operating systems provide efficient memory management and still research is being conduct to improve IJTSRD26731
  • 2. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD26731 | Volume – 3 | Issue – 5 | July - August 2019 Page 1986 the way the memory is allocated forapplications becausethe main problem faces by memory allocation algorithms is to efficiently allocating the demanded memory blocks to the demanding applications with the minimum response time along with minimum memory loss in the shapeoftraditional memory loss problem called the fragmentation of memory. We will use the placement algorithm to efficiently allocate the processes in the main memory. A. First-fit In First-fit, scan the memory from the beginningandallocate the first available block that is large enough. It is one of the fastest algorithms as it would search only as little as possible. But, the remaining unused memory areas left after allocations become waste if it is toosmaller.Thus requestfor large memory requirement cannot be accomplished.Wewill prove that the following problem, which algorithm makes the most efficient use of memory. Implementation in First-fit: 1. Input memory blocks with size and processes with size. 2. Initialize all memory blocks as free. 3. Start by picking each process and check if it can be assigned to current block. 4. If size-of-process <= size-of-block if yes then assign and check for next process 5. If not then keep checking the further blocks. For example: Given ten memory partitions of500KB,200KB, 800KB, 400KB, 100KB, 700KB, 300KB, 600KB, 1000KB, 900KB (in order), How would the First-fit, Best-fit, Worst- fit algorithms place processes of212KB,150KB,375KB,950KB, 350KB, 632KB, 400KB, 717KB, 811KB (in order)? Which algorithm makes the most efficient use of memory? In First-fit: 212KB is put in 500KB partition 150KB is put in 288KB (new partition 288KB=500KB- 212KB) 375KB is put in 800KB partition 950KB is put in 1000KB partition 350KB is put in 425KB(new partition425KB=800KB-375KB 632KB is put in 700KB partition 400KB is put in 400KB partition 717KB is put in 900KB partition 811 must wait Figure1. First-fit Output results B. Best-fit In Best-fit, the entire list of blocks must be searched the closest in size to the request and allocate this block.Memory utilization is much better than First-fit as it searches the smallest free partition first available. But, it is slower and may even tend to fill up memory with tiny useless holes. Implementation in Best-fit: 1. Input memory blocks with size and processes with size. 2. Initialize all memory blocks as free. 3. Start by picking each process and find the minimum block size that can be assigned to current process i.e., find min(blockSize[1]),blockSize[2],………,blockSize[n]> processSize[current] it found then assign it to the current process. 4. If not then leave that process and keep checking the further processes. Calculation with Best-fit, above the problem describes in First-fit In Best-fit: 212KB is put in 300KB partition 150KB is put in 200KB partition 375KB is put in 400KB partition 950KB is put in 1000KB partition 350KB is put in 500KB partition 632KB is put in 700KB partition 400KB is put in 600KB partition 717KB is put in 800KB partition 811KB is put in 900KB partition Figure2. Best-fit Output results C. Worst-fit In Worst-fit, the entire list of blocks must be searched the largest block and allocate this block. Reduce the rate of production of small gaps. In contrast, this strategy produces the largest leftover block, which may be big enough to hold another process. But, if a process requiring larger memory arrives at a later stage then it cannot be accommodated as the largest hole is already split and occupied. Implementation in Worst-fit: 1. Input memory blocks with size and processes with size. 2. Initialize all memory blocks as free. 3. Start by picking each process and find the maximum block size that can be assigned to current process i.e., find max (blockSize[1]), blockSize[2],…….,blockSize[n]> processSize[current] it found then assign it to the current process. 4. If not then leave that process and keep checking the further processes. Calculation with Worst-fit, above the problem describes in First-fit In Worst-fit: 212KB is put in 1000KB partition 150KB is put in 900KB partition 375KB is put in 800KB partition 950KB must wait 350KB is put in 788KB (new partition 788KB=1000KB- 212KB)
  • 3. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD26731 | Volume – 3 | Issue – 5 | July - August 2019 Page 1987 632KB is put in 750KB (new partition 750KB=900KB- 150KB) 400KB is put in 700KB partition 717KB must wait 811KB must wait Figure3. Worst-fit Output results 3. Experimental Results In this paper, we have been seen that Best-fit algorithm is the best among three placement algorithms. We are explained with a problem, how to calculate this algorithm. These algorithms cannot eliminate external fragmentation. To overcome this problem, we must use compaction. Figure4. Comparison of Three Allocation Algorithms for Performance 4. Conclusion Main memory management is very important in operating system. Simulations have shown that both First-fit and Best- fit are better than Worst-fit in terms of decreasing both time and storage utilization. Neither First-fit norBest-fitis clearly better in terms of storage utilization but First-fit is generally faster. Among three algorithms, Best-fitalgorithmmakes the most efficient use of memory. In this paper, we also proved that Best-fit algorithm is the best in memory utilization. References [1] Rachael Chikorrie, Okuthe P. Kogeda, Manoj Lall: “An Optimized Main Memory Management Partitioning Placement Algorithm”, Pan African conference on Science, computing and Telecommunications (PACT) Publisher, July 27-29, Kampala Uganda 2015. [2] Abraham Silerschatz, Peter Beer Galvin, and Greg Gange, “Operating System Concepts”, John Wiley & Sons, INC., January 1, 2002. [3] William Stallings, “Operating System Internals and Design Principles”, March 20, 2017. [4] Ledisi G. Kabari, TamunoomieS. Gogo, ”Efficiency of Memory Allocation Algorithms Using Mathematical Model”, International Journal of Emerging Engineering Research and Technology Volume 3, Issue 9, September, 2015, PP 55-67 [5] Muhammand Abfullh Awais, “Challenges and Techniques for Algorithms in Relation with Today’s Real Time Needs”, International journal of Multi- Disciplinary Sciences and Engineering, vol.7, No.3, March 2016.