Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 3 pages
Exam (elaborations)

CS250 – FINAL QUESTIOS AND ANSWERS

Document preview thumbnail
Preview 1 out of 3 pages

CS250 – FINAL QUESTIOS AND ANSWERS

Content preview

CS250 – FINAL QUESTIOS AND ANSWERS


Assuming a 32 bit architecture and a 4KB page size, how many first level page tables
are needed for a single process? How many second-level page tables are needed for a
single process? - Answer -One first-level page table is needed. Up to 2^10-1 second-
level page tables are allocated as needed.

Enumerate the page bits in the page table and what each of them is used for. - Answer
-Resident Bit: page is resident in RAM instead of swap space/file
Modified Bit: page has been modified since the last time the bit was cleared. Set by the
MMU
Access Bit: page has been read since the last time the bit was cleared. Set by the MMU
Permission:
Read --> page is readable
Write --> page is writable
Execute --> page can be executed (MMU enforces permissions)

Enumerate the five uses of virtual memory used to speed up the execution of a
program. - Answer -1. Mmap the text segment of an executable or shared library
2. Mmap the data segment of a program
3. Use of VM during fork to copy memory of the parent into the child
4. Allocate zero-initialized memory. It is used to allocate space for bss, stack and sbrk()
5. Shared memory between processes

Explain how copy-on-write works during fork(). - Answer -- After forking the child gets a
copy of the memory of the parent
- Both parent and child share the same physical memory as long as they are not
modified
- When a page is modified by either parent or child, the OS will create a copy of the
page in RAM and will do modifications on the copy
- The copy on write in fork is accomplished by making the common pages read-only
- The OS will catch the modifications during the page-fault, and it will create a copy and
update the page table of the writing process
- Then it will retry the modify instruction

Explain how allocating memory initialized with zeros is accelerated by using Virtual
Memory. - Answer -When a page is modified the OS creates a copy of the page (copy
on write) and retries the modifying instruction. This allows fast allocation. No RAM is
initialized to 0's until the page is modified. This also saves RAM. Only modified pages
use RAM.

Explain what is L1, L2, L3 cache. - Answer -Level 1 cache (L1 cache) - on the
processor chip

Document information

Uploaded on
December 10, 2025
Number of pages
3
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GEEKA
3.8
(361)
Sold
2135
Followers
1447
Items
58440
Last sold
3 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions