0% found this document useful (0 votes)
115 views3 pages

Memory Management: Practice Exercise

The document discusses memory management techniques including virtual memory. It provides an example memory configuration diagram and questions about memory allocation strategies. It also covers the operation and management of virtual memory in Linux and Windows systems.

Uploaded by

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

Memory Management: Practice Exercise

The document discusses memory management techniques including virtual memory. It provides an example memory configuration diagram and questions about memory allocation strategies. It also covers the operation and management of virtual memory in Linux and Windows systems.

Uploaded by

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

IT2106

Practice Exercise
Memory Management
Objectives:

At the end of the exercise, the students should be able to:

 Examine some techniques in memory partitioning; and


 Analyze the underlying concepts and implications of virtual memory.

Part I (20 points)


Instructions: Read the description of the memory configuration and analyze the given diagram. Then, answer
the following questions.

Memory Configuration: A computer implements a dynamic partitioning technique for memory


management. A number of allocation and swapping-out operations have been carried out while the
computer is up and running. The diagram below shows the computer's current memory
configuration/allocation. The addresses go from left to right. The gray areas represent blocks that are
occupied by running processes, while the white areas indicate free memory blocks. The last process
that was loaded into the memory is marked with a red X in the diagram, and its size is 2MB. Only one
process was swapped out after that.

Questions
1. If you are to add a new 10MB process in the memory, where could it possibly be added and
why?
Yes, Virtual memory in this configuration because in the variable partition scheme
initially, memory will be a single continuous free block. Whenever a request is
received by the process, a record is made in the memory. If the smaller process
continues, the bigger division will be divided into smaller partitions. The following
strategies are used to avoid the problem of external fragmentation. Compaction is the
process of relocating all processes to the top or bottom of the stack to create free
accessible memory in a single continuous location.

2. What could be the size of the free block just before it was partitioned by X? Rationalize your
answer. (5 points)

3. Would you suggest the provisioning of virtual memory in this configuration? Why or why not?
(5 points)
Yes, it supports multitasking, allowing processes and the kernel to operate on their
own private address space without worrying about contention. It supports
oversubscription of the main memory, allowing the operating system to transparently
map virtual memory between the main and the secondary memory, as needed. It is not
a real memory and most operating systems map virtual memory to real memory only
on demand (when the memory is first populated or written).

4. Is it possible to add a new 7MB process using the first-fit placement algorithm without
swapping out any process? Why or why not?
Yes, a new 7MB process may be added using the first-fit placement technique
without switching out any existing processes. Because the initial fit allocates the first
05 Practice Exercise 1 *Property of STI
Page 1 of 2
IT2106

adequate process from left to right in a partition. As a result, the 8MB while box is free
to place 7MB.

Part II (40 points)


Instructions:
1. Explain the operation and management of the following virtual memory. Search for relevant studies
and literatures that would support your answer. Properly cite your references. (10 points x 2 items)

 Linux Virtual Memory


Virtual memory is a memory management capability of an OS that uses hardware and software to
allow a computer to compensate for physical memory shortages by temporarily transferring data
from random access memory (RAM) to disk storage. Virtual memory is the use of space on a hard
disk drive (HDD) to simulate additional main memory. Memory I used to hold portions of the
operating system, programs and data that are currently in use or that are frequently used.
Physically, main memory (also referred to as primary memory) consists of random-access memory
(RAM) chips that are combined into modules which, in turn, are inserted into slots on the
motherboard (i.e., the main circuit board) on a computer. The times required to access different
addresses (i.e., locations) in RAM are extremely short and nearly equal, in contrast to the varying
delay times for accessing locations on the HDD and other storage devices. To free up space in
memory, an operating system with a virtual memory capability transfers data that is not
immediately needed from memory to the HDD: when that data is needed again, it is copied back
into memory. That is, when all the RAM is being used (e.g., if there are many programs open
simultaneously or if one very large program is in use), a computer with virtual memory enabled will
swap data to the HDD and back to memory as needed, thus, in effect, Increasing the total system
memory.
 Windows Virtual Memory
On Windows 10, virtual memory (or paging file) is an essential component (hidden file) designed to
remove and temporarily store less frequently use modified pages allocated in RAM (random-
access memory) to the hard drive. Using this approach allows the system to prioritize faster
physical memory for more frequent processes and applications, improving the overall performance
and preventing the device from locking up in the event it runs out of system memory.

05 Practice Exercise 1 *Property of STI


Page 2 of 2
IT2106

Organization The presentation of ideas was generally organized. 3


TOTAL 10

2. Then, answer the following items based on your research. (4 items x 5 points)
a. Between the operation and management of Linux and Windows virtual memory, which do you
think is less complex and why?
b. Were you able to find similarities between Linux and Windows virtual memory?
o If your answer is yes, explain each similarity.
o If your answer is no, explain the possible reason why there is no similarity.
c. What are the possible drawbacks of not implementing virtual memory?
d. If you are to design a memory management system, would you incorporate virtual memory
into your design? Why or why not?

Grading Rubric for Essay:


Criteria Performance Indicator Points
Content Correct ideas and concepts were utilized. 3
Organization The presentation of ideas was generally organized. 2
TOTAL 5

Note: DO NOT COPY AND PASTE. All students who copy and paste their work from any website or their classmates will automatically receive a failing mark for this assessment task.

05 Practice Exercise 1 *Property of STI


Page 3 of 2

You might also like