Assignment 4
Assignment 4
VARNEET
OPERATING SYSTEMS
ANSWER 1. Simple paging along with virtual memory paging both include breaking
memory into set-sized sections, regardless their numerous applications and operating
methods. Simple paging serves as a memory management method in which demands
can be given non-contiguous memory addresses to avoid splitting by using fixed-sized
pages from physical memory. Conversely, virtual memory paging transcends this
concept by combining hardware and software to produce the illusion of a larger address
space than is actually present. This allows programs to effectively parallelism and
process separation by using more memory than is physically accessible by swapping
pages in and out of disk storage as needed.
ANSWER 2. Despite the fact that they refer to distinct features, a page and a frame
have similarities ideas in memory management. A page is a fixed-sized data block
stored in the virtual memory space of a system. It speaks to a physical data unit that
could take residence in memory. In comparison, a frame in RAM is a fixed-sized piece of
physical memory. The operating system transforms pages to frames whenever an app
wants to have access to data, so transforming digital addresses actual real addresses.
Pages thus remain in virtual storage; frames are physical memory location where the
pages are maintained during usage.
ANSWER 3. While they serve various objectives, resident set management and page
replacement policy constitute extremely essential elements of virtual memory systems.
Resident set control over the amount of frames a process receives as well as which
pages—the local setup—are kept in physical memory. To ensure the optimal potential
speed, users must pick and choose on the quantity and type of RAM pages to be
utilized. If a page fault occurs, on the opposite hand, a page replacement policy kicks in
to indicate that the desired page is not stored in physical memory. The policy indicates
which sections from physical memory should be removed to provide sufficient room for
the extra page. Common page replacement principles demand for Optimal Page
Replacement, First-In- First-Out (FIFO), and the least Recently Used (LRU).
ANSWER 4. Here is how you use the Buddy System to allocate memory:
Define the total amount of available RAM when initializing the memory pool.
Need to Allocate Memory: Please provide the required memory block size.
Locate the Appropriate Block: Try to find the smallest available block that fits the size
you've specified.
If the smallest block is excessively big, you can divide it into smaller ones.
Confirm the Block's Allocation: Put the block into use after you've allocated it.
We can see this in action by looking at an example.
Minimalist building block design: Divide 1024 KB by 512 KB, then divide 512 KB by 256
KB, and so on.
Dividing 256 KB into 128 KB and 64 KB is an example of this.
Set aside a 128 KB chunk
These are the blocks that are currently available: [512 KB, 256 KB, 128 KB, 64 KB, 64
KB]
A 300 KB request:
REFRENCES:
1. Silberschatz, A., Galvin, P. B., & Gagne, G. (2020). Operating system concepts
(10th ed.). Wiley.
2. Stallings, W. (2018). Operating systems: Internals and design principles (9th ed.).
Pearson.
3. Tanenbaum, A. S., & Bos, H. (2015). Modern operating systems (4th ed.).
Pearson.