Professional Documents
Culture Documents
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:
- Where: Add it at the end of the memory because there's a big enough free space there.
- Size: It's 2MB, the same as the last process marked with X.
- 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.
- Not possible without swapping because the largest available space is only 2MB.
- Best-Fit:
- First-Fit:
1.:
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.
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.:
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 have ways to extend memory when needed (swap space or pagefile).
Yes, because: