You are on page 1of 3

Aguilar, Markenly C.

LAB EXERCISE PLAT TECH

BSIT 303
Questions
1. If you are to add a new 10MB process in the memory, where could it possibly be added and
why? (5 points)
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)
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? (5 points)
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. (2 items x 5 points)

Part 1:

1. Adding a 10MB Process:

- Where: Add it at the end of the memory because there's a big enough free space there.

2. Size of Free Block Before X:

- Size: It's 2MB, the same as the last process marked with X.

3. Provisioning Virtual Memory:

- Consider it if your computer frequently runs out of physical memory and swaps processes. Otherwise,
it might not be necessary and could slow down your system.

4. Adding a 7MB Process with First-Fit:

- Not possible without swapping because the largest available space is only 2MB.

5. New 3MB Process Allocation:

- Best-Fit:

- Before: [Empty Memory]

- After: [2MB Free] [3MB Process]

- First-Fit:

- Before: [Empty Memory]

- After: [2MB Free] [3MB Process]


Part 2:

1.:

Linux Virtual Memory:

Operation:

In Linux, virtual memory works by using a mix of physical RAM and disk space. When a process starts, it
gets a virtual address space larger than the available RAM. Linux uses a paging system to move data
between RAM and disk, freeing up RAM for active processes.

Management:

The kernel manages virtual memory using the Memory Management Unit, Page Tables, and swapping
mechanisms. It decides which pages stay in RAM based on algorithms like Least Recently Used. System
administrators can tweak settings like swappiness to control swapping behavior.

Windows Virtual Memory:

Operation:

In Windows, virtual memory also combines physical RAM and disk space. The Memory Manager uses a
paging file on disk (pagefile.sys) to supplement RAM. When RAM is insufficient, data is moved between
RAM and the paging file.

Management:

Windows uses a demand-paging system, bringing data into RAM only when needed. The Memory
Manager handles page tables and page faults. Windows provides tools like Task Manager for users to
monitor memory. System administrators can configure virtual memory settings.

2.:

a. Complexity of Linux vs. Windows Virtual Memory:

Linux: You can fine-tune memory with commands and files. More control but might need more manual
adjustments.

Windows: More automated. The system handles things for you. Might be simpler for those who prefer
less hands-on management.
b. Similarities Between Linux and Windows Virtual Memory:

- Both use demand paging (bring in pages when needed).

- Both mix physical and virtual memory.

- Both use page tables to map virtual to physical addresses.

- Both have ways to extend memory when needed (swap space or pagefile).

c. Drawbacks of Not Having Virtual Memory:

- Limited ability to run many apps at once.

- Can't allocate more virtual memory than physically available.

- Lack of memory isolation between processes.

- Less flexibility in adapting to changing memory needs.

d. Incorporating Virtual Memory in Memory Management:

Yes, because:

- Allows flexible resource allocation.

- Provides memory isolation for stability.

- Enables efficient multitasking.

- Allows dynamic adjustments to changing memory needs.

You might also like