Exercise 1 Flashcards

1
Q

What is physical memory usually represented as?

A

An array of bytes

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

Which data structure best represents the chess board?

A

Array

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

Which data structure best stores printing job in printers?

A

Queue

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

What are we advocating as software engineering process model in CSD2181/2183?

A

Test-Driven Development

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

IF speed is important to me when randomly picking an item from a collection, which implementation should I use?

A

Array

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

How do we exploit the locality of reference principle when we design code (multiple answers)?

A
  1. Keep subsequent data accessed close to each other in memory.
  2. Allocate and self-manage contiguous memory of our program.
  3. If the same data is accessed frequently, keep it in a cache that has high-speed access but smaller storage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In a binary buddy sytem, what happens when a request is made and its size is less than the initial block but greater than half of it?

A

The entire block is allocated.

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

If the total size of free blocks is larger than the size of requested memory, then there will be no “out of memory” error.

A

False.

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

Which of the following best reduces internal fragmentation?

A

Use variable block sizes

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