Operating System: Memory Management Report - Semester 2, 2024

Verified

Added on  2020/04/07

|15
|3807
|171
Report
AI Summary
This report delves into the critical topic of memory management within operating systems. It begins with an abstract and introduction, followed by a literature review that explores dynamic memory allocation and its role in optimizing system performance. The report examines search strategies and methodologies used to analyze memory allocation techniques. It includes detailed solutions for various memory allocation algorithms, such as the best-fit and first-fit algorithms, and discusses the concept of fragmentation, differentiating between internal and external fragmentation. The report further analyzes the TLSF algorithm and its suitability for real-time systems. Overall, the report provides a comprehensive overview of memory management strategies, their associated challenges, and their impact on system efficiency and performance.
Document Page
Operating System
Operating System
Student Name
University Name
1
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Operating System
Contents
Solution 1.........................................................................................................................................3
Abstract........................................................................................................................................3
Introduction..................................................................................................................................3
Literature Review.........................................................................................................................4
Search Strategy............................................................................................................................5
Selection.......................................................................................................................................5
Methodology................................................................................................................................5
Conclusion...................................................................................................................................5
Solution 2.........................................................................................................................................6
Best fit Algorithm........................................................................................................................6
First Fit Algorithm.......................................................................................................................6
Solution 3.........................................................................................................................................7
Solution 4.........................................................................................................................................9
Solution 5.......................................................................................................................................10
Solution 6.......................................................................................................................................12
Solution 7.......................................................................................................................................13
References......................................................................................................................................15
2
Document Page
Operating System
Solution 1
Abstract
Within a recent era of the computing world, operating systems as well as applications, competent
memory not capable to outlast without management, chiefly if a relevance or application for an
indeterminately long time must be subject to severe load. To amplify the performance assets they
should be efficiently utilized. Real time frameworks and systems ought to utilize memory to
execute or perform timely and with efficiency, otherwise, the aim of real time frameworks or
system is going to be lost. It's utterly a responsibility of the OS to convey help for the processes
of memory management through numerous strategies because it acts as a key resource, for
instance, the interface which runs on a hardware as well as application. Numerous memory
allocation or distribution algorithms are designed to prepare memory, in keeping with the
requirements and eventualities of use in numerous timestamps, however, there are several
problems and challenges to supply full support or assistance for the fact of those allocations. In
the OS, our management is completely controlled by numerous aspects such as memory
management, application level, hardware level, as well as software system level particularly.
Introduction
OS goes about as an interface among the end users and hardware. It controls all the operation as
well as computer system processing. What's more, it is additionally characterized as a unique
program that deals with the PC equipment. The centralized computer working framework is
composed predominantly to advance the utilization of equipment. The PC OS's help multifaceted
recreations, various business applications and for all in the middle of, the OS for portable or
flexible PCs give an environment in which client or user can readily interface to perform and
execute the program with a PC. In this manner, a few operating systems are actually panned or
designed to be properly arranged, for others to wind up plainly proficient, and by a couple of
combination or mix-up of the two others.
3
Document Page
Operating System
Literature Review
Article Selected: Dynamic Memory Allocation: Role in Memory Management.
Retrieved From:
https://www.researchgate.net/publication/
265166374_Dynamic_Memory_Allocation_Role_in_Memory_Management
Dynamic memory administration assumes a vital part in memory administration because the
overhead connected with the static memory administration is allotted for all the programs that
keep running on time accumulation as well as does not utilize any piece of the memory block
which can't be utilized by different applications. For Effective utilization of advantages and more
lively memory distributions, dependable load memory record structure is utilized, the stack
utilizing static memory designation utilize DMA and makes it more efficient than the static
memory portion (Irabashetti & Patil, 2016). Dynamic memory administration for Operating
System includes the utilization of pointers plus standard library capacities, in particular, malloc,
realloc and free. The initial two capacities are utilized to assign memory, though the last one is
utilized to return all the memory to the framework. In this article author Nilesh Vishwasrao Patil
explains that the pointers are utilized to point the pieces of memory dispensed progressively.
Much research has been properly done to enhance the dynamic memory management for
operating system repeats and the rudiments of various and consecutive fit are dependable in the
changing territory, which must be moved forward. Two-level distinctive fit calculations are one
of the enhancements of the diverse fit calculation. Considering the prerequisites of continuous
frameworks, diverse calculations have been projected independently from two different levels.
Indeed, even few changes have been completed on various calculations at two basic levels with
the goal that it surely is made much more reasonable for the ongoing or real time frameworks
4
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Operating System
(Irabashetti & Patil, 2016). In this article an immense amount of detailed data relevant to
operating system strategies for the memory management, calculations, allocations as well as
issues related to these strategies or techniques are mentioned (Irabashetti & Patil, 2016). In this
study, author also research all issues or concerns associated with operating systems as well as
whole algorithms associated with Operating systems and also research the complications
connected with these techniques as well as methods. Author in this article also research on all
required methods and techniques so that each and every reader of this article is capable to answer
all the research questions related to the real-time exceptional applications and about dynamic
operating systems. At first, I found that memory management procedures and techniques within
OS essentially build my comprehension about the management of memory as well as I learn that
it is important not to neglect and miss the fundamental ideas and thoughts. In this study, author
concludes that operating system with dynamic or alive memory management too has advantages
and disadvantages and technology must be superlatively utilized in critical parts of operating
systems.
5
Document Page
Operating System
Search Strategy
Keeping in mind the end goal to acquire important research papers with an emerging
investigation of rising memory management procedures, conceivable research was led in IEEE,
computerized library, research papers, Google Scholars. To get pertinent research learning, I
utilized few keywords like memory allocation of memory management, memory management,
and real-time OS allocation of memory, memory allocation issues or problems, dynamic memory
allocation techniques.
Selection
After fundamental investigations on memory management of the operating system, I use to
discover issues connected with the management of an operating system with the help of
customary procedures of memory administration as well as proper strategies for identification of
these issues are necessary because an operating system with fewer applications are not utilized
for constant or real-time memory rehearse.
Methodology
Instead of an uncontaminated proportional examination of strategies for memory management of
the operating system, my main focus and attention are on immoderation of OS, methods as well
as techniques of memory management and also on the understanding of those situations or
circumstances where these techniques and methods are functional. Thus to focus and concentrate
more on all the outcomes a general idea in addition to fundamental details of a small number of
new as well as pre-existing methods and techniques has been used appropriately for this study or
research.
Conclusion
It has been concluded that mainly all algorithms are improved versions of previously discussed
blueprint like the chronological as well as separate fit plus TLSF. The investigation exhibits that
the specify of TLSF is reasonable for the constant framework in the strategy in light of the fact
that the inward fragmentation is low because of TLSF, its response time is immense, and it is an
essential request of all ongoing structures. The hugest factor is aside from this, TLSF portion
notwithstanding assignment time is a little unfaltering time which makes it speedier than all other
ordinary strategies.
6
Document Page
Operating System
Solution 2
Best fit Algorithm
With the help of best-fit algorithm memory block size required by any of the jobs is easily
calculated just by using the formula mentioned below:
Size (Block) = size (Header) +n
When block size is obtained than scanning of block list is done and this scanning has been done
with the formula:
N Words> = size (Block)
Therefore for our all problems allocation or allotment of the jobs to all memory blocks is shown
in the table mentioned below:
Number of Job Requested
Memory
Allocated or allotted
Memory Block
Size of Memory Block
Job A 57 K Block 4
Extreme order memory
300 K
Job C 50 K Block 3 200 K
Job D 701 K Block 1 Low order Memory 900 K
As we know that Job B needs 920K, therefore, it will never be allocated to the enduring Block 2
whose size is 910K because the block size of memory is not sufficient to convince its constraint,
it requires a minimum of 920 block size memory.
First Fit Algorithm
All the jobs are completely allocated to free block memory. In this approach, by searching
throughout the free or liberated memory blocks as well as once an adequate memory block is
found, it is then allocated, with no consideration about the blocks of memory that has not been
reached and it finishes completely after finding the initial proper free partition.
Number of Job Requested Memory Allocated or allotted Memory Size of Memory
7
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Operating System
Block Block
Job A 57 K Block 1 900 K
Job C 50 K Block 2 910 K
Jobs mentioned below were not at all allocated for any of the free memory slabs because when
Job A is allocated to the Block 1, and the outstanding blocks are not adequate for B as well as
when Job 2 is allocating to the Block 3, furthermore no more remaining block is there for Job D.
Jobs mentioned below are not at all allocated.
Job D 701 K
Job B 920 K
Solution 3
In the computer storage, the fragmentation is basically an incident in which space for storage is
utilized inefficiently, falling capacity or presentation as well as often both. Accurate
consequences of the fragmentation based on the detailed structure of storage allotment in use,
plus the certain form of disintegration or fragmentation. As a rule, fracture prompts storage room
being "squandered", and all things considered the term additionally alludes to the squandered
space itself. For different frameworks, the space used to store given information is the same
paying little mind to the level of fracture. There are three extraordinary yet related types of
fracture: outside discontinuity, inner fracture, and information discontinuity, which can be
available in disconnection or conjunction. Fracture is regularly acknowledged in kind for
enhancements in speed or straightforwardness. Closely resembling marvels happen for different
assets, for example, processors (Hirschberg, 2015). At the point when a PC program demands
pieces of memory from the PC framework, the squares are allotted in lumps. At the point when
the PC program is done with a piece, it can free the lump back to the framework, making it
accessible to later be designated again to another or a similar program. The size and the measure
of time, a piece is held by a program fluctuate. Amid its life expectancy, a PC program can
demand and free many pieces of memory. At the point when a program is begun, the free
memory regions are long and adjacent. After some time and with utilize, the long touching
districts wind up plainly divided into little and little bordering ranges. Within a long run, it might
8
Document Page
Operating System
completely windup obviously unthinkable for a program to get costly adjacent lumps of the
memory. Discontinuity happens inside an exceptionally dynamic memory distribution structure
when a few free pieces are genuinely little to persuade any demand.
Internal Fragmentation: It is a space which is squandered inside designated memory
frameworks or pieces because of limitations on the allowable sizes of all apportioned squares.
All owed or assigned memory may be to some degree bigger than the asked for memory
consequently this distinction in sizes cause parcel of memory, however not being used. Inward
Fragmentation is essentially a region or a district and in addition a page which never used by the
work involving that specific locale or for a page. Additionally, this space is totally inaccessible
for utilize by the structure until the point when that particular employee is not completed totally
and the area or page is discharged (Cunningham, 2013). At the point when the procedure is
somewhat more than the asked for memory from the memory procedure, it makes a void space in
a distributed piece, which makes inner discontinuity. Because of the guidelines representing
memory assignment, more PC memory is some of the time dispensed than is required. For
instance, memory must be given to programs in pieces distinguishable by 4, 8 or 16, and thus if a
program asks for maybe 23 bytes, it will really get a lump of 32 bytes. At the point when this
happens, the overabundance memory goes to squander. In this situation, the unusable memory is
contained inside a dispensed locale. This course of action named settled allotments, experiences
wasteful memory utilize - any procedure, regardless of how little, possesses a whole segment.
This waste is called interior fracture. Not at all like different sorts of fracture, inward
discontinuity is hard to recover, normally an ideal approach to expel it with a plan change. For
instance, in the powerful memory portion, memory pools definitely cut interior discontinuity by
spreading the space overhead finished a bigger number of articles.
External Fragmentation: This fragmentation happens when the dynamic calculation of the
memory assignment allocates to a couple of memory and in addition, a little piece remains that
can't be effectively used. In the event that a lot of outside discontinuity occurs than the usable
memory diminished radically. General memory space introduces just to persuade a demand, be
that as it may, it is never be bordering. At the point when a procedure stacks and is expelled from
memory, the clear space makes an opening in the memory space, and there are a few gaps in a
memory space and this is named as an outer fracture. Despite the fact that the primary fit and
9
Document Page
Operating System
also the ideal fit can change the genuine outside fracture sum, it can't be totally disposed of.
Compaction can be the ideal answer for external fracture. Outer discontinuity emerges when free
memory is isolated into little pieces and is mixed by assigned memory. It is a shortcoming of
certain capacity distribution calculations when they neglect to arrange memory utilized by
programs proficiently (Stott, 2014). The outcome is that, albeit free stockpiling is accessible, it is
viable unusable on the grounds that it is isolated into pieces that are too little independently to
fulfill the requests of the application. The expression "outer" alludes to the way that the unusable
stockpiling is outside the designated districts. For instance, consider a circumstance where in a
program allows 3 constant pieces of memory and after that liberates the center square. The
memory allocator can utilize this free square of memory for future assignments. Be that as it
may, it can't utilize this square if the memory to be allotted is bigger in estimate than this free
piece. Outside discontinuity likewise happens in document frameworks the same numbers of
records of various sizes are made, change measure, and are erased. The impact is much more
terrible if a document which is separated into numerous little pieces is erased, on the grounds
that this leaves comparably little locales of free spaces (Balyan, Saini, Sharma & Aggarwal,
2015). The key explanation for episodes of inside and also outside or external fracture is that
inward or inner discontinuity happens when the memory is part into pieces of settled size while
the outer discontinuity happens when the memory variable is partitioned into the size squares. At
the point when the designated memory obstructs in the process moves toward becoming to some
degree bigger than the asked for memory after that space left in a dispensed memory model or
square is because of inside fracture. Then again, when the system is confined from memory, at
that point it makes complimentary space, which causes an opening inside a memory and it is
named as outside discontinuity (Cunningham, 2013).
Solution 4
a) Number of required pages for the storage of whole Job
Bits required for the storage of page numbers = 3 bits
10
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Operating System
Bits required for the storage of offset = 7 bits
b)
Solution 5
a) By utilizing FIFO page removal algorithm,
11
Document Page
Operating System
Number of fault occurs = 10
Ration of Page Fault = 9/12 * 100 = 75 %
Ratio of no page fault = 2/12 * 100 = 16.67%
b) By utilizing FIFO
Number of fault occurs = 9
Ration of Page Fault = 9/12 * 100 = 75 %
Ratio of no page fault = 3/12 * 100 = 25%
12
chevron_up_icon
1 out of 15
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]