100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
OS TEST 2 Questions With 100% Verified Answers $11.49   Add to cart

Exam (elaborations)

OS TEST 2 Questions With 100% Verified Answers

 1 view  0 purchase
  • Course
  • OS TE
  • Institution
  • OS TE

OS TEST 2 Questions With 100% Verified Answers What requirements is memory management intended to satisfy? - answer1. Relocation - A process that has been swapped out to a disk can be moved to a different memory location than the one it was in previously. 2. Protection - Each process should be...

[Show more]

Preview 3 out of 17  pages

  • October 2, 2024
  • 17
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • OS TE
  • OS TE
avatar-seller
Brainbarter
©BRAINBARTER 2024/2025




OS TEST 2 Questions With 100% Verified
Answers


What requirements is memory management intended to satisfy? - answer✔1. Relocation - A
process that has been swapped out to a disk can be moved to a different memory location than
the one it was in previously.
2. Protection - Each process should be protected from unwanted interference by other processes,
so programs in other processes should not be able to reference memory locations in a process for
reading or writing purposes without permission; satisfied by the processor (hardware)
3. Sharing - Allowing several processes to access the same portion of main memory. Memory
management system must allow controlled access to shared areas of memory without
compromising essential protection
4. Logical organization - Enabling the OS and computer hardware to deal with user programs
and data in the form of modules of some sort
5. Physical organization - The organization of the flow of information between main and
secondary memory

Why is the capability to relocate processes desirable? - answer✔It is limiting to declare that
when a process is swapped back in, that it has to be placed in the same memory location it had
before.

Why is it not possible to enforce memory protection at compile time? - answer✔The OS cannot
anticipate all the memory references a program will make, and even if it could, it would be
prohibitively time consuming to screen each program in advance for possible memory-reference
violations.
What are some reasons to allow two or more processes to all have access to a particular region of
memory? - answer✔If a number of processes are executing the same program, it is advantageous
to allow each process to access the same copy of the program rather than have its own copy.
Processes that are cooperating on some task may need to share access to the same data structure.
In a fixed-partitioning scheme, what are the advantages of using unequal-size partitions? -
answer✔Processes are assigned in such a way as to minimize wasted memory within a partition
(internal fragmentation). Larger programs can be accommodated without overlay.

, ©BRAINBARTER 2024/2025


What is the difference between internal and external fragmentation? - answer✔Internal
fragmentation mean there is wasted space internal to a partition due to the fact that the block of
data loaded is smaller than the partition.


External fragmentation occurs when memory is allocated and a small piece is left over that
cannot be effectively used.

What are the distinctions among logical, relative, and physical addresses? - answer✔A logical
address is a reference to a memory location independent of the current assignment of data to
memory; a translation must be made to a physical address before the memory access can be
achieved.
A relative address is a particular example of logical address, in which the address is expressed as
a location relative to some known point, usually a value in a processor register. A physical
address is an actual location in main memory.

What is the difference between a page and a frame? - answer✔A page is a part of a process,
while a frame is a part of memory.

What is the difference between a page and a segment? - answer✔Segmentation is visible to the
programmer and is provided as a convenience for organizing programs and data, while paging is
invisible to the programmer.

What is the difference between simple paging and virtual memory paging? - answer✔In contrast
to simple paging, not all pages of a process have to be in main memory for the process to run.
Pages may be read in as needed. Also, in virtual memory paging, reading a page into main
memory may require writing a page out to disk.

Explain thrashing. - answer✔Thrashing is when the system spends most of its time swapping
pieces of a process rather than executing instructions. To overcome this, the OS essentially
guesses which pieces are least likely to be used in the near future, based on recent history, and
will swap those out of main memory.

Why is the principle of locality crucial to the use of virtual memory? - answer✔The principle of
locality states that program and data references within a process tend to cluster. This validates
the assumption that only a few pieces of a process are needed over a short period of time. This
also means that it should be possible to make intelligent guesses about which pieces of a process
will be needed in the near future, which avoids thrashing. These two things mean that virtual
memory is an applicable concept and that it is worth implementing.

What elements are typically found in a page table entry? Define each element. - answer✔The
frame number, which tells the corresponding page in main memory.

, ©BRAINBARTER 2024/2025




A modify (M) bit, which indicates whether the contents of the corresponding page have been
altered since the page was last loaded into main memory.


A present (P) bit, which indicates whether the corresponding page is in main memory or not.

What is the purpose of a translation lookaside buffer? - answer✔To reduce the memory access
time of a virtual memory scheme. It acts as a cache for page table entries that have been most
recently used.

Briefly define the alternative page fetch policies. - answer✔Demand paging - A page is brought
into main memory only when a reference is made to a location on that page.


Prepaging - Pages other than the one demanded by a page fault are brought in.
What is the difference between resident set management and page replacement policy? -
answer✔Resident set management - how many page frames are to be allocated to each active
process, and whether the set of pages to be considered for replacement should be limited to those
of the process that caused the page fault or encompass all the page frames in main memory.


Replacement policy - Among the set of pages considered, which particular page should be
selected for replacement.

What is the relationship between FIFO and clock page replacement algorithms? - answer✔Both
treat the page frames allocated to a process as a circular buffer, with which a pointer is
associated.

What is accomplished by page buffering? - answer✔Page buffering essentially creates a cache of
pages by assigning a replacement page to one of two lists: the free page list or the modified page
list. The page to be replaced remains in memory.
Why is it not possible to combine a global replacement policy and a fixed allocation policy? -
answer✔A fixed allocation policy gives a process a fixed number of frames in main memory.
This number is decided at initial load time (process creation time). In this policy, when a page
fault occurs in the execution of a process, one of the pages of that process must be replaced.


A global replacement policy considers all unlocked pages in main memory as candidates for
replacement, regardless of which process owns a particular page.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Brainbarter. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $11.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62491 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$11.49
  • (0)
  Add to cart