100% found this document useful (3 votes)
4K views3 pages

05laboratory Exercise1 Morales BSIT1-2A PlatformTechnology

The document summarizes a laboratory exercise on memory management. It discusses: - The current memory configuration of a computer with occupied and free memory blocks. - Questions about adding new processes, the size of a free block, using virtual memory, and placement algorithms. - Virtual memory management in Linux and Windows, which use demand paging and page memory in 4KB pages. - Similarities between Linux and Windows memory management, and the importance of implementing virtual memory to avoid filling physical memory.

Uploaded by

Hazzel Gilvero
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
100% found this document useful (3 votes)
4K views3 pages

05laboratory Exercise1 Morales BSIT1-2A PlatformTechnology

The document summarizes a laboratory exercise on memory management. It discusses: - The current memory configuration of a computer with occupied and free memory blocks. - Questions about adding new processes, the size of a free block, using virtual memory, and placement algorithms. - Virtual memory management in Linux and Windows, which use demand paging and page memory in 4KB pages. - Similarities between Linux and Windows memory management, and the importance of implementing virtual memory to avoid filling physical memory.

Uploaded by

Hazzel Gilvero
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

Name: Daren Cristian M.

Morales Date: 12/13/2021


05 Laboratory Exercise 1
Memory Management

PART I.
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?
Answer: If I will be adding 10MB process in the memory, the first vacant memory space starting
from the left which has 4MB will merge with the 1MB memory space. But still, the combination
of two is not enough for the 10MB process, so the next memory space which has the 5MB will
be merged from the addition of 4MB and 1MB. The addition of 4MB, 1MB and 5MB will have a
total of 10MB memory space which is enough for the 10MB process. This process is called
compaction.

2. What could be the size of the free block just before it was partitioned by X? Rationalize your
answer.
Answer: The size of the free block before it was partitioned by X is 7MB. The size of the process
is 2MB and left 5MB out of 7MB. The whole 7MB was deducted by 2MB that is why the
remaining space was 5MB.

3. Would you suggest the provisioning of virtual memory in this configuration? Why or why
not?
Answer: Yes, making use of this configuration on a virtual memory works. We are making use of
the dynamic partitioning in this configuration that offers better space management, that is why
making use of this configuration works. This prevents the memory from running out of space
easily.
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?
Answer: Yes, because there’s a space with 8MB of available memory space where the 7MB
process can fit. When the 7MB process was places inside the 8MB memory space, it leaves 1MB
memory space.
5. A new process is requesting a 3MB allocation. Illustrate the possible memory configuration
using a horizontal segmented memory strip (like the diagram above), where a partition will be
created for the new process under the following placement algorithms: best-fit and first-fit.
Label your illustration clearly.

Best-fit:

4MB 1MB 5MB 8MB 2MB 4MB 3MB

X
The 3MB process will be placed here.

First-fit:

1MB 1MB 5MB 8MB 2MB 4MB 3MB

X
3MB

This is the 3MB process.


PART II.
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.
*Linux Virtual Memory – Virtual memory is supported by Linux. The subsystem of the Linux
memory management is the one that manages the memory inside the system. It holds the
implementation of demand paging and virtual memory. It also holds the memory allocation for
kernel internal structures and user space programs.
Reference: JavaTPoint. (n.d.). “Linux Memory Management”.
Retrieved from https://www.javatpoint.com/linux-memory-management

*Windows Virtual Memory – Windows has virtual memory and physical memory. The memory
in Windows is managed in pages. The size of memory pages for both physical and virtual
memory are 4KB. The total of transferable memory is 4GB on 32-bit (x86) architectures. It is
equally divided into system space and user space.
Reference: Andrea Fortuna. (2019). “Some thoughts about Windows Memory Management”.
Retrieved from: https://www.andreafortuna.org/2019/03/13/some-thoughts-about-windows-
memory-management/

2. Then, answer the following items based on your research.

a. Between the operation and management of Linux and Windows virtual memory, which do
you think is less complex and why?
Answer: For me, Linux is better because it makes your computer’s CPU to have less strain or
huge load and does not need as much hard drive space.

b. Where you able to find similarities between Linux and Windows memory?
Answer: Yes, there are similarity and difference between the Linux and Windows. Both
Windows and Linux may not use the RAM in the same way, but the task that they are doing
with it is the same.

c. What are the possible drawbacks of not implementing virtual memory?


Answer: It may lead to complications like not being able to run or load applications. If the
available RAM of your computer is filled up or loaded, the problem could occur.

d. If you are to design a memory management system, would you incorporate virtual memory
into your design? Why or why not?
Answer: Yes, because the virtual memory lets the system to compensate the shortages of the
physical memory. This is very important if you want your system to be efficient and avoid filling
up the memory.

You might also like