Professional Documents
Culture Documents
Lesson 2 Memory Management
Lesson 2 Memory Management
3. What are some reasons to allow two or more processes to all have access to a particular region of
memory?
Answer:
If a number of processes are executing the same program, it is advantageous to allow each process to access
the same copy of the program rather than have its own separate copy. Processes that are cooperating on some
task may need to share access to the same data structure.
PAGE FRAME
7. What is the difference between simple paging and virtual memory paging?
Answer:
SIMPLE PAGING VIRTUAL MEMORY PAGING
In simple paging, all the pages of a process But in virtual memory, not all pages of a
must be in main memory for process to run, process need be in main memory frames for
unless overlays are used the process to run. Pages may be read in as
needed.
8. Explain thrashing.
Answer:
Thrashing happens when too many computer processes compete for inadequate memory resources.
Thrashing can occur due to several factors, with the most prominent reason being insufficient RAM or
memory leakage. In a computer, some applications have higher priorities than others and this can also
attribute to thrashing when there is a lack of memory resources. Thrashing can cause slowdown of the
system performance since data transfer has to be between the hard drive and physical memory. One
of the early signs of thrashing is when an application stops responding while the disk drive light blinks
on and off. The operating system often warns users of low virtual memory when thrashing is occurring.
Demand Paging - a page is brought to main memory Pre-Paging - pages other than the one demanded by
only when a reference is made to a location on that a page fault are brought in.
page.
10. What is the difference between resident set management and page replacement policy?
Answer:
RESIDENT SET MANAGEMENT PAGE REPLACEMENT POLICY
In resident set management the operating In page replacement policy when the memory is
system must decide how much main memory to full, a decision must be made as to which page
allocate to a particular process when that or pages are to be replaced. The page
process is swapped in. This can be a static replacement policy determining where the page
allocation made at process creation time, or it should be load, and how the page load, and
can change dynamically. what type of algorithm should be used to load a
page.
11. What is the relationship between FIFO and clock page replacement algorithms?
Answer:
The clock policy is similar to FIFO, except that in the clock policy, any frame with a use bit of 1 is passed
over by the algorithm.
12. What is the difference between are resident set and a working set?
Answer:
Resident set is that portion of the process image that is actually in real-memory at a particular
instant. Working set is that subset of resident set that is actually needed for execution.