Memory Management Flashcards

1
Q

What is the main difference between physical and virtual memory?

A

Physical memory is stored on a storage medium, like DRAM, SRAM, an HDD, or an SSD. Virtual Memory is an abstraction of memory for the purpose of simple software design.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TRUE/FALSE: Virtual memory is abstracted, but its address space is still mapped directly to hardware, and is limited to that amount of space.

A

FALSE: Virtual memory has a large address space that might not really exist in physical memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between symmetric and asymmetric memory access?

A

Symmetric access allows for equal and full access to all memory by all processor units and cores. Asymmetric access partitions memory into regions to allow for faster local access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between synchronous and asynchronous I/O?

A

Synchronous I/O processes wait for the completion of any I/O requests to continue its process. Asynchronous I/O processes send the info of the I/O request back through asynchronous means such as callbacks or polling.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

TRUE/FALSE: Writing a block of data to a file on the disc is an example of a “burst” pattern, not a “random” pattern.

A

TRUE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

TRUE/FALSE: Accessing many different variables throughout a complex algorithm is an example of a “random” pattern, not a burst pattern.

A

TRUE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

TRUE/FALSE: Uploading a file to a server is an example of a “random” pattern, not a “burst” pattern.

A

FALSE: It’s an example of a burst pattern.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

TRUE/FALSE: Retrieving all files on the disc starting with the letter ‘A’ is an example of a “burst” pattern, not a “random” pattern.

A

FALSE: It’s an example of a random pattern.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

TRUE/FALSE: Loading and storage is byte-oriented.

A

TRUE, also word-oriented.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe Endianness.

A

The storage of data, specifically if the most- or least- (or median-, rarely) significant byte.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is cache coherency?

A

The maintenance of caches in a multi-core system to make sure processors can access the correct data despite multiple caches.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

TRUE/FALSE: Read and write access is byte-oriented.

A

FALSE: Read/write access is Block-oriented. Blocks typically have 4096 bytes each.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

TRUE/FALSE: Read/write access is efficient for small memory updates and reads, but less efficient for large-scale updates and reads.

A

FALSE: Since Read/Write access is block-oriented, it is less efficient for small reads and writes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What direction is the stack and heap read from in processes?

A

Inwards. The stack and heap grow until they overlap (hopefully never).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

TRUE/FALSE: There are parts of memory the user isn’t allowed to access without Macros or Inline Assembly.

A

TRUE, the kernel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What function in C can copy memory?

A

memcpy(…);

17
Q

What functions in C allocate and free memory?

A

malloc and free.

18
Q

What is NUMA?

A

Non-Uniform Memory Access. Time for memory access depends on proximity from processor to memory location.

19
Q

What are Memory Barriers?

A

Constraints and instructions to ensure correctness of memory operations’ ordering.