You are on page 1of 2

Part 1:

1. If you are to add a new 10MB process in the memory, where could it possibly be added and
why?
• I think the new 10MB process will be allocated at the bar of 8MB because I think the
process on the right side of 8MB block is already swapped out from the RAM so the 8MB
plus the size of the memory on its right side is enough to for the new 10MB process.
2. What could be the size of the free block just before it was partitioned by X? Rationalize
your answer.
• I think the size of the free block is 8MB because in the given above the diagram it says
that the partition with x mark has a size of 2MB, and there a free block in its left side
which is in 1MB size and %Mb on its right side, so 2MB + 1MB + 5MB is equal to 8MB.
3. Would you suggest the provisioning of virtual memory in this configuration? Why or why
not?
• Yes, because in the variable partition scheme initially, If the smaller process keeps on
coming, then the larger partition will be made into smaller partitions. To avoid the
problem of external fragmentation the following techniques are used compaction in
which moving all the processes towards the top or towards the bottom to make the free
available memory in a single continuous place.
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, the implement of the first-fit placement algorithm is scanning the memory from the
beginning then chooses the first available block that is large enough for the process, in
the figure above there’s an 8MB available block that is large enough to handle the 7MB
of process.
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.
Part 2:

1. Linux Virtual Memory


• Linux supports virtual memory, that is, using a disk as an extension of RAM so that the
effective size of usable memory grows correspondingly. The kernel will write the
contents of a currently unused block of memory to the hard disk so that the memory
can be used for another purpose. When the original contents are needed again, they are
read back into memory. This is all made completely transparent to the user; programs
running under Linux only see the larger amount of memory available and don't notice
that parts of them reside on the disk from time to time. Of course, reading and writing
the hard disk is slower (on the order of a thousand times slower) than using real
memory, so the programs don't run as fast. The part of the hard disk that is used as
virtual memory is called the swap space.
Windows Virtual Memory
• In Microsoft Windows Operating Systems, the Virtual Memory Manager maps the
virtual addresses belonging to the address space of a running process to physical pages
of memory in the computer. This ensures that each process has sufficient virtual
memory to run efficiently and does not trespass on the memory of other processes. The
Virtual Memory Manager handles paging between RAM and the page file, swapping
pages by using a process called demand paging. The result is that each application has
access to up to 4 GB of memory. A similar process in older versions of Windows like
Microsoft Windows 95 and Windows 98 uses a comparable structure called the swap
file.
2.
a. Between the operation and management of Linux and Windows virtual memory, which do
you think is less complex and why?
• I think it’s the Window since it is way more advance than the Linux and it is the
operating
system that I am more familiar with. Also, we can use the Windows easily than the Linux.
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.
• I think their similarity is swapping the process in other memory and get it back again
when
they already have enough space to handle it.
c. What are the possible drawbacks of not implementing virtual memory?
• I think there’s a possibility that the computer will experience lagging especially if there’s
many
processes and the and since there’s no virtual memory RAM cannot accommodate it all.
d. If you are to design a memory management system, would you incorporate virtual memory
into your design? Why or why not?
• I think no, since virtual memory doesn’t help too much in computers performance.

You might also like