This document discusses different memory management techniques used in operating systems. It begins by describing the basic components and functions of memory. It then explains various memory management algorithms like overlays, swapping, paging and segmentation. Overlays divide a program into instruction sets that are loaded and unloaded as needed. Swapping loads entire processes into memory for execution then writes them back to disk. Paging and segmentation are used to map logical addresses to physical addresses through page tables and segment tables respectively. The document compares advantages and limitations of these approaches.
This Presentation is for Memory Management in Operating System (OS). This Presentation describes the basic need for the Memory Management in our OS and its various Techniques like Swapping, Fragmentation, Paging and Segmentation.
Segmentation topic is presented in a most easy way.
Segmentation is a user view of memory in Operating System. Segmentation is one of the most common ways to achieve memory protection. In a computer system using segmentation, an instruction operand that refers to a memory location includes a value that identifies a segment and an offset within that segment.
Gives an overview about Process, PCB, Process States, Process Operations, Scheduling, Schedulers, Interprocess communication, shared memory and message passing systems
This Presentation is for Memory Management in Operating System (OS). This Presentation describes the basic need for the Memory Management in our OS and its various Techniques like Swapping, Fragmentation, Paging and Segmentation.
Segmentation topic is presented in a most easy way.
Segmentation is a user view of memory in Operating System. Segmentation is one of the most common ways to achieve memory protection. In a computer system using segmentation, an instruction operand that refers to a memory location includes a value that identifies a segment and an offset within that segment.
Gives an overview about Process, PCB, Process States, Process Operations, Scheduling, Schedulers, Interprocess communication, shared memory and message passing systems
Virtual Memory
• Copy-on-Write
• Page Replacement
• Allocation of Frames
• Thrashing
• Operating-System Examples
Background
Page Table When Some PagesAre Not in Main Memory
Steps in Handling a Page Fault
In this presentation, I am explaining about Threads, types of threads, its advantages and disadvantages, difference between Process and Threads, multithreading and its type.
"Like the ppt if you liked the ppt"
LinkedIn - https://in.linkedin.com/in/prakharmaurya
In the given presentation, process overview,process management scheduling typesand some more basic concepts were explained.
Kindly refere the presentation.
Virtual Memory
• Copy-on-Write
• Page Replacement
• Allocation of Frames
• Thrashing
• Operating-System Examples
Background
Page Table When Some PagesAre Not in Main Memory
Steps in Handling a Page Fault
In this presentation, I am explaining about Threads, types of threads, its advantages and disadvantages, difference between Process and Threads, multithreading and its type.
"Like the ppt if you liked the ppt"
LinkedIn - https://in.linkedin.com/in/prakharmaurya
In the given presentation, process overview,process management scheduling typesand some more basic concepts were explained.
Kindly refere the presentation.
Operating systems types, spooling and bufferingAyush Jain
THIS PPT IS MADE BY STUDENTS OF GIOE. THE PROJECT GIVEN TO US WAS REGARDING OPERATING SYSTEM AND THEIR TYPES ALONG WITH SPOOLING AND BUFFERING. THERE ARE MAIN POINTS ABOUT SPOOLING AND BUFFERING AND ALSO COVERS KEY DIFFERENCES. HOPE THIS INFORMATION IS USEFUL.
THANKS
HITAARTH JAINN
He was a very compassionate and was very courageous. He always remained ready to work for the cause of humanity. His family was spiritually inclined and he had inherited this inclination .This spiritual environment throw a deep impact on his upbringing. From the very beginning he was a man of ethics and values.
Operating system (OS) itself is a process, what approaches are there.pdfJUSTSTYLISH3B2MOHALI
Operating system (OS) itself is a process, what approaches are there to distinguish an OS process
from other user processes. Briefly describe each approach and compare their relative
merits.Operating system (OS) itself is a process, what approaches are there to distinguish an OS
process from other user processes. Briefly describe each approach and compare their relative
merits.
Solution
A process is a program in execution, whereas a thread is a path of execution within a process.
Processes are generally used to execute large, ‘heavyweight’ jobs such as running different
applications, while threads are used to carry out much smaller or ‘lightweight’ jobs such as auto
saving a document in a program, downloading files, etc. Whenever we double-click an
executable file such as Paint, for instance, the CPU starts a process and the process starts its
primary thread.
From the kernel\'s perpective, each process has its own address space, file descriptors, etc and
one thread of execution. To support multiple threads at user-level, the process contains code to
create, destroy, schedule and synchronise user-level threads - which can be thought of as
mulitplexing many user-level threads onto the single kernel thread, all managed within the
process. The scheduler can run any arbitrary scheduling algorithms, and is independent of the
kernel\'s scheduler.
User-level threads can also satisfy a huge number of threads if necessary, as it can take
advantage of virtual memory to store user-level thread control blocks and stacks.
These are often cooperative schedulers, as there is usually only rudimentary support (if any) for
delivering timer ticks to the user-level scheduler. However the application must be specifically
written for cooperative scheduling, containg yields such that other threads have an opportunity to
run; a single badly written thread without enough yields can monopolise cpu time. Alternatively,
these can also be preemptive multitaskers, where the user level thread package receives regular
signals from the operating system, which may initiate the context switch. These have high
granularity though and aren\'t really practical.
Another important consideration is making system calls non blocking, so that the user-level
thread scheduler can schedule (overlap) execution of another thread with I/O latency rather than
blocking the whole process. This is not alway possible (either because of lack of async I/O
system calls), or because events such as page faults (which are always synchronous) will block
the process and all the user-level threads in side.
Advantages: User level threads are more configurable, as they may use any scheduling
algorithm, and they can also run on any OS (probably even DOS) since they do not require
kernel support for multiple threads. User level threading is also much faster, as they don\'t need
to trap to kernel space and back again.
User level threads packages are generally cooperatively scheduled as is usually only rudimentar.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Memory Management in OS
1. Memory Management inMemory Management in
Operating SystemsOperating Systems
V.V. SubrahmanyamV.V. Subrahmanyam
SOCIS, IGNOUSOCIS, IGNOU
Date: 31Date: 31stst
March, 2008March, 2008
Time: 19-00 to 19-45Time: 19-00 to 19-45
2. MemoryMemory
Memory is central to the operation of a modernMemory is central to the operation of a modern
computer system.computer system.
Memory is a large array of words or bytes, eachMemory is a large array of words or bytes, each
location with its own address.location with its own address.
Interaction is achieved through a sequence ofInteraction is achieved through a sequence of
reads/writes of specific memory address.reads/writes of specific memory address.
The CPU fetches the program from the hard diskThe CPU fetches the program from the hard disk
and stores in the memory.and stores in the memory.
If a program is to be executed, it must beIf a program is to be executed, it must be
mapped to absolute addresses and loaded intomapped to absolute addresses and loaded into
memory.memory.
3. Contd…Contd…
In a multiprogramming environment, in order toIn a multiprogramming environment, in order to
improve both the CPU utilisation and the speedimprove both the CPU utilisation and the speed
of the computer’s response, several processesof the computer’s response, several processes
must be kept in memory.must be kept in memory.
There are many different algorithms dependingThere are many different algorithms depending
on the particular situation to manage theon the particular situation to manage the
memory.memory.
Selection of a memory management scheme forSelection of a memory management scheme for
a specific system depends upon many factors,a specific system depends upon many factors,
but especially upon the hardware design of thebut especially upon the hardware design of the
system.system.
Each algorithm requires its own hardwareEach algorithm requires its own hardware
support.support.
4. Memory Management –Memory Management –
Responsibilities of OSResponsibilities of OS
Keep track of which parts of memory areKeep track of which parts of memory are
currently being used and by whom.currently being used and by whom.
Decide which processes are to be loadedDecide which processes are to be loaded
into memory when memory spaceinto memory when memory space
becomes available.becomes available.
Allocate and deallocate memory space asAllocate and deallocate memory space as
needed.needed.
5. Contd…Contd…
In the multiprogramming environmentIn the multiprogramming environment
operating system dynamically allocatesoperating system dynamically allocates
memory to multiple processes.memory to multiple processes.
Thus memory plays a significant role inThus memory plays a significant role in
the important aspects of computer systemthe important aspects of computer system
like performance, S/W support, reliabilitylike performance, S/W support, reliability
and stability.and stability.
6. OverlaysOverlays
In idealistic situation, the entire program and itsIn idealistic situation, the entire program and its
related data is loaded in physical memory forrelated data is loaded in physical memory for
execution.execution.
But what if process is larger than the amount ofBut what if process is larger than the amount of
memory allocated to it?memory allocated to it?
We can overcome this problem by adopting aWe can overcome this problem by adopting a
technique called astechnique called as OverlaysOverlays. Like dynamic. Like dynamic
loading, overlays can also be implemented byloading, overlays can also be implemented by
users without OS support.users without OS support.
7. The entire program or application is divided intoThe entire program or application is divided into
instructions and data sets such that when oneinstructions and data sets such that when one
instruction set is needed it is loaded in memoryinstruction set is needed it is loaded in memory
and after its execution is over, the space isand after its execution is over, the space is
released.released.
As and when requirement for other instructionAs and when requirement for other instruction
arises it is loaded into space that was releasedarises it is loaded into space that was released
previously by the instructions that are no longerpreviously by the instructions that are no longer
needed.needed.
Such instructions can be called as overlays,Such instructions can be called as overlays,
which are loaded and unloaded by the program.which are loaded and unloaded by the program.
8. DefinitionDefinition: An overlay is a part of an: An overlay is a part of an
application, which has been loaded at sameapplication, which has been loaded at same
origin where previously some other part (s) oforigin where previously some other part (s) of
the program was residing.the program was residing.
A program based on overlay scheme mainlyA program based on overlay scheme mainly
consists of following:consists of following:
A “root” piece which is always memory residentA “root” piece which is always memory resident
Set of overlays.Set of overlays.
Overlay gives the program a way to extendOverlay gives the program a way to extend
limited main storage. An important aspectlimited main storage. An important aspect
related to overlays identification in program isrelated to overlays identification in program is
concept of mutual exclusion i.e., routines whichconcept of mutual exclusion i.e., routines which
do not invoke each other and are not loaded indo not invoke each other and are not loaded in
memory simultaneously.memory simultaneously.
9. Example of OverlayExample of Overlay
Read ( )
Function1 ( )
Function2 ( )
Display ( )
Read ( )
Display ( )
Function2 ( )Function1()
20 K
20K Read( ) Read ( )
50K Function1( )
Function 1( ) Function 2( )
70K Function 2( )
Overlay A 40K Display ( ) Overlay B
40K Display ( ) (50K) (70K)
Without Overlay (180K) With Overlay (Maximum.130K)
10. Limitations of OverlaysLimitations of Overlays
Overlays scheme suffers from following limitations:Overlays scheme suffers from following limitations:
Require careful and time-consuming planning.Require careful and time-consuming planning.
Programmer is responsible for organizingProgrammer is responsible for organizing
overlay structure of program with the help of fileoverlay structure of program with the help of file
structures etc. and also to ensure that piece ofstructures etc. and also to ensure that piece of
code is already loaded when it is called.code is already loaded when it is called.
Operating System provides the facility to loadOperating System provides the facility to load
files into overlay region.files into overlay region.
11. SwappingSwapping
Swapping is an approach for memorySwapping is an approach for memory
management by bringing each process inmanagement by bringing each process in
entirety, running it and then putting it back on theentirety, running it and then putting it back on the
disk, so that another program may be loadeddisk, so that another program may be loaded
into that space.into that space.
Swapping is a technique that lets you use a diskSwapping is a technique that lets you use a disk
file as an extension of memory.file as an extension of memory.
Lower priority user processes are swapped toLower priority user processes are swapped to
backing store (disk) when they are waiting forbacking store (disk) when they are waiting for
I/O or some other event like arrival of higherI/O or some other event like arrival of higher
priority processes. This ispriority processes. This is Rollout SwappingRollout Swapping..
Swapping the process back into store whenSwapping the process back into store when
some event occurs or when needed (may be in asome event occurs or when needed (may be in a
different partition) is known asdifferent partition) is known as Roll-in swappingRoll-in swapping..
13. Benefits of SwappingBenefits of Swapping
Allows higher degree of multiprogramming.Allows higher degree of multiprogramming.
Allows dynamic relocation, i.e., if addressAllows dynamic relocation, i.e., if address
binding at execution time is being used we canbinding at execution time is being used we can
swap in different location else in case of compileswap in different location else in case of compile
and load time bindings processes have to beand load time bindings processes have to be
moved to same location only.moved to same location only.
Better memory utilisation.Better memory utilisation.
Less wastage of CPU time on compaction, andLess wastage of CPU time on compaction, and
Can easily be applied on priority-basedCan easily be applied on priority-based
scheduling algorithms to improve performance.scheduling algorithms to improve performance.
14. LimitationsLimitations
Entire program must be resident in storeEntire program must be resident in store
when it is executing.when it is executing.
Also processes with changing memoryAlso processes with changing memory
requirements will need to issue systemrequirements will need to issue system
calls for requesting and releasing memory.calls for requesting and releasing memory.
It is necessary to know exactly how muchIt is necessary to know exactly how much
memory a user process is using and alsomemory a user process is using and also
that it is blocked or waiting for I/O.that it is blocked or waiting for I/O.
15. Logical and Physical AddressLogical and Physical Address
SpaceSpace
The computer interacts via logical and physicalThe computer interacts via logical and physical
addressing to map memory.addressing to map memory.
Logical address is the one that is generated byLogical address is the one that is generated by
CPU, also referred to as virtual address. TheCPU, also referred to as virtual address. The
program perceives this address space.program perceives this address space.
Physical address is the actual addressPhysical address is the actual address
understood by computer hardware i.e., memoryunderstood by computer hardware i.e., memory
unit. Logical to physical address translation isunit. Logical to physical address translation is
taken care by the Operating System.taken care by the Operating System.
17. PagingPaging
In a paged system, logical memory is dividedIn a paged system, logical memory is divided
into a number of fixed sizes ‘chunks’ calledinto a number of fixed sizes ‘chunks’ called
pagespages..
The physical memory is also predivided intoThe physical memory is also predivided into
same fixed sized blocks (as is the size of pages)same fixed sized blocks (as is the size of pages)
calledcalled page framespage frames..
The page sizes (also the frame sizes) areThe page sizes (also the frame sizes) are
always powers of 2, and vary between 512 bytesalways powers of 2, and vary between 512 bytes
to 8192 bytes per page. The reason behind thisto 8192 bytes per page. The reason behind this
is implementation of paging mechanism usingis implementation of paging mechanism using
page number and page offset.page number and page offset.
19. Page AllocationPage Allocation
In variable sized partitioning of memory every time whenIn variable sized partitioning of memory every time when
a process of sizea process of size nn is to be loaded, it is important tois to be loaded, it is important to
know the best location from the list of available/freeknow the best location from the list of available/free
holes. This dynamic storage allocation is necessary toholes. This dynamic storage allocation is necessary to
increase efficiency and throughput of system. Mostincrease efficiency and throughput of system. Most
commonly used strategies to make such selection are:commonly used strategies to make such selection are:
Best-fit Policy:Best-fit Policy: Allocating the hole in which theAllocating the hole in which the
process fits most “tightly” i.e., the difference between theprocess fits most “tightly” i.e., the difference between the
hole size and the process size is the minimum one.hole size and the process size is the minimum one.
First-fit Policy:First-fit Policy: Allocating the first available holeAllocating the first available hole
(according to memory order), which is big enough to(according to memory order), which is big enough to
accommodate the new process.accommodate the new process.
Worst-fit Policy:Worst-fit Policy: Allocating the largest hole that willAllocating the largest hole that will
leave maximum amount of unused space i.e., leftoverleave maximum amount of unused space i.e., leftover
space is maximum after allocation.space is maximum after allocation.
20. Now, question arises which strategy is likely toNow, question arises which strategy is likely to
be used?be used?
In practice, best-fit and first-fit are better thanIn practice, best-fit and first-fit are better than
worst-fit. Both these are efficient in terms of timeworst-fit. Both these are efficient in terms of time
and storage requirement.and storage requirement.
Best-fit minimize the leftover space, createBest-fit minimize the leftover space, create
smallest hole that could be rarely used.smallest hole that could be rarely used.
First-fit on the other hand requires leastFirst-fit on the other hand requires least
overheads in its implementation because of itsoverheads in its implementation because of its
simplicity.simplicity.
Possibly worst-fit also sometimes leaves largePossibly worst-fit also sometimes leaves large
holes that could further be used toholes that could further be used to
accommodate other processes. Thus all theseaccommodate other processes. Thus all these
policies have their own merits and demerits.policies have their own merits and demerits.
22. SegmentationSegmentation
Segmentation presents an alternative schemeSegmentation presents an alternative scheme
for memory management.for memory management.
This schemeThis scheme divides the logical address spacedivides the logical address space
into variable length chunks, called segments,into variable length chunks, called segments,
with no proper ordering among them. Eachwith no proper ordering among them. Each
segment has a name and a length. Forsegment has a name and a length. For
simplicity, segments are referred by a segmentsimplicity, segments are referred by a segment
number, rather than by a name.number, rather than by a name.
Thus, the logical addresses are expressed as aThus, the logical addresses are expressed as a
pair of segment number and offset withinpair of segment number and offset within
segment.segment.
23. It allows a program to be broken down intoIt allows a program to be broken down into
logical parts according to the user view oflogical parts according to the user view of
the memory, which is then mapped intothe memory, which is then mapped into
physical memory.physical memory.
Though logical addresses are two-Though logical addresses are two-
dimensional but actual physical addressesdimensional but actual physical addresses
are still one-dimensional array of bytesare still one-dimensional array of bytes
only.only.