Lecture 15 Flashcards

1
Q

Function of operating system

A

“Middleman” to run your executable codes on the computers.

Need to put your programs into the physical memory space before they are run by CPU.

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

How to manage programs

A

The first approach: simply allocate them
based on the size of program code (called
“process” in OS)
Eventually see “holes” scattered in different places

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

Paging system

A

Divide the physical memory space into pages.

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

First-fit Strategy

A

Allocate the FIRST hole that is big enough

reason: simple

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

Best-Fit Strategy

A

Allocate the SMALLEST hole that is big enough

reason: produce the smallest left-over hole

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

Worst-Fit Strategy

A

Allocate the LARGEST hole

reason: produce the largest left-over hole

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

External Fragmentation

A

Total free-memory exists to satisfy a request, but it is not contiguous
(solution: compact the free memory into one contiguous space)

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

Internal Fragmentation

A

Part of the nature in the paging system

solution: use smaller page size

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

How to manage memory with a Linked List and keep track of all allocated and free memory pages

A

–When a request (called “job” in OS) comes, use the specific strategy to find the “hole”
–Allocate the free-memory pages to the allocated-memory pages
–Update BOTH linked lists
–Calculate the fragmentation
–Do the compaction if necessary

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