Virtual Memory Management Flashcards (45 cards)

All cards

1Question

How many entries does a single-level page table have with a 32-bit virtual address and 4 KB pages?

Answer

1,048,576 entries.

2Question

How much memory does that page table occupy per process with 4-byte entries?

Answer

4 MB.

3Question

How does hierarchical paging organize virtual address space?

Answer

It divides the virtual address space into multiple page tables, effectively paging the page table itself.

4Question

How is a 32-bit virtual address divided in a two-level page table with 4 KB pages?

Answer

A 10-bit outer-table index, a 10-bit inner-table index, and a 12-bit page offset.

5Question

Where does a hashed page table map a virtual page number?

Answer

To a table location whose entry points to a linked list of entries sharing its hash value.

6Question

How many entries does an inverted page table have per real memory page?

Answer

One entry.

7Question

How many page tables does an inverted page-table system use?

Answer

One page table for all processes in the system.

8Question

When does demand paging load pages into physical memory?

Answer

Only when they are needed during program execution.

9Question

What does a valid bit indicate about a page?

Answer

The page is in main memory.

10Question

What happens when an invalid page is referenced?

Answer

A page fault occurs.

11Question

What happens first when the operating system handles a page fault?

Answer

It validates the reference.

12Question

What is thrashing in a process’s memory activity?

Answer

Thrashing is spending most of the time swapping pages because there are too few frames.

13Question

Why does thrashing cause low CPU utilization?

Answer

Processes spend most of their time paging instead of doing useful work.

14Question

What does segmentation divide virtual memory into?

Answer

Multiple virtual address spaces called segments.

15Question

What does each component of a segmented virtual address ⟨s,d⟩ represent?

Answer

s identifies the segment, and d is the offset within it.

16Question

How is a segmented logical address translated when its offset is within the limit?

Answer

The segment base plus the offset.

17Question

On the Intel Pentium, what does the segmentation unit translate a virtual address into?

Answer

A linear address.

18Question

On the Intel Pentium, what does the paging unit translate a linear address into?

Answer

A physical address.

19Question

In a 64-bit virtual-address system with 2048-byte pages, how many offset bits are used?

Answer

11 bits.

20Question

After an 11-bit offset, how many virtual-address bits remain for the page number?

Answer

53 bits.

21Question

With 53 page-number bits and 9 index bits per level, how many page-table levels are required?

Answer

6 levels.

22Question

Which page-table structures can reduce page-table size?

Answer

Hierarchical, hashed, or inverted page tables.

23Question

When was the VAX minicomputer sold?

Answer

From 1977 to 2000.

24Question

How many sections divide the VAX 32-bit virtual address space?

Answer

Four sections of 2302^{30} bytes each.

25Question

How many bits specify the section in a VAX virtual address?

Answer

2 bits.

26Question

How many bits specify the page number within a VAX section?

Answer

21 bits.

27Question

How large is the outer page table for a 64-bit address with 4 KB pages and 4-byte entries?

Answer

2442^{44} bytes.

28Question

Why are up to seven paging levels considered unacceptable on a 64-bit system?

Answer

They can require seven memory accesses to translate a virtual address.

29Question

What does each hashed page-table list element contain?

Answer

The virtual page number, mapped page-frame value, and pointer to the next element.

30Question

How does hashed address translation find a page frame?

Answer

It hashes the virtual page number, searches for a matching entry, and returns the corresponding page-frame address.

31Question

What does each inverted page-table entry store about its page?

Answer

The page’s virtual address and information about the process that owns it.

32Question

What is the memory-use and search-time tradeoff of an inverted page table?

Answer

It reduces page-table memory use but increases search time.

33Question

What is the cost of using hashing to reduce inverted page-table search time?

Answer

One extra memory access.

34Question

What memory benefit does demand paging provide?

Answer

It reduces memory consumption.

35Question

What response-time benefit does demand paging provide?

Answer

It provides faster response times.

36Question

How can an operating system worsen thrashing after observing low CPU utilization?

Answer

It may add more processes, worsening the thrashing problem.

37Question

Which separate segments may a C compiler create?

Answer

Code, global variables, the heap, each thread's stack, and the standard C library.

38Question

What does a segment-table entry's base specify?

Answer

The segment's starting physical address.

39Question

What physical address does ⟨2,53⟩ resolve to when segment 2 starts at 4300?

Answer

4353.

40Question

Where does virtual address ⟨3,852⟩ resolve if segment 3 starts at physical address 3200?

Answer

Physical address 4052.

41Question

Why is virtual address ⟨0,1222⟩ invalid when segment 0 is 1000 bytes long?

Answer

Its offset exceeds the segment limit.

42Question

Which memory-management modes does the Intel Pentium support?

Answer

Pure segmentation and segmentation combined with paging.

43Question

With 4-byte entries and 2048-byte pages, how many entries fit in each page-table page?

Answer

512 entries.

44Question

How many index bits per level are needed for 512 page-table entries?

Answer

9 bits.

45Question

How does a lazy pager differ from a lazy swapper?

Answer

A lazy pager loads individual pages on demand; a lazy swapper moves an entire process at once.

Test yourself with the quiz

Answer 18 questions on Virtual Memory Management.

1. A process uses a 32-bit virtual address space, 4 KB pages, and 4-byte page-table entries. How large is its single-level page table?

2. A system designer wants to reduce the memory required for page tables. Which set names methods that can do this?

Take the quiz →

Read the study guide

Go over the full study guide for Virtual Memory Management.

Read the study guide →

Related classes

Make your own flashcards

Upload your class notes and Revizly writes your flashcards in about a minute.

Flashcard maker