Memory Flashcards Preview

A2P > Memory > Flashcards

Flashcards in Memory Deck (14):
1

How does one find the actual amount of used memory when using the top utility?

Actual Memory Used = Used - Cached

2

In terms of memory, what is a common occurrence on a system that has been running awhile.

A large portion of the RAM will be taken up by the cache.

3

Why does memory pressure occur?

Memory pressure occurs when memory is needed on a system. Processes may be killed, memory may be swapped out, data may be removed from the cache, etc.

4

How do you tell you are under memory pressure?

Look for the entries in /proc/vmstat. Virtually all the entries that say "scan" in them are reacting to memory pressure. These counters also have per-zone counterparts in /proc/zoneinfo.

5

What are the different layers of memory? What is the order from fastest to slowest?

CPU register, CPU cache, RAM, disk.

6

How large is a page?

4KB

7

What is paging?

Paging is the movement of pages in and out of memory. Allows partially loaded programs to execute, making it possible for programs larger than the main memory to run.

8

Difference between a dirty page and a clean page.

A dirty page requires a write to the disk before unloading the file from memory.
Ex: Opening a file, adding a word and then saving the file

A clean page means no changes were made to a file, so it can be unloaded from memory immediately.

9

What is file system paging?

Reading/writing of pages in memory mapped files and of filesystems that use the page cache.

10

What is anonymous paging?

Paging that is private to a process. Anonymous paging = swapping (moving pages in and out of swap). Page ins can hurt performance as they are run synchronously.

11

On demand paging

On demand paging maps pages of virtual memory to main memory when it is needed as opposed to when memory is first allocated.

12

What is a page fault and when does it occur?

A page fault occurs the first time a page of virutal memory is mapped. The page takes longer to access the first time than it will thereafter.

13

What makes up the Virtual memory size?
Resident Set Size(RES)?

Virt Size = Size of all allocated pages(unmapped, mapped to main memory, mapped to swap)

RES = size of allocated main memory pages

14

What do the file system cache and buffer cache improve?

The file system cache improves read performance, while buffering inside the cache improves write performance.