Memory Management Flashcards

1
Q

Define the following terms:
Page
Frame
Segment

A

Frame: A fixed length block of memory

Page: A fixed length block of data that resides in secondary memory (eg. disk)

Segment: A variable length block of data that resides in secondary memory.

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

True or False
A page of data may be temporarily copied into a frame of main memory

A

True

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

Define Segmentation

A

This process involves an entire segment being temporarily copied into main memory.

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

-something to remember-

A

In a uniprogramming system, main memory is divided into two parts: one part
for the operating system (resident monitor, kernel) and other part for the program
currently being executed.

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

-something to remember-

A

In a multiprogramming system, the “user” part of
memory must be further subdivided to accommodate multiple processes. The task
of subdivision is carried out dynamically by the operating system and is known as
memory management .

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

What are the five requirements that memory management should satisfy?

A
  1. Relocation
  2. Sharing
  3. Protection
  4. Physical Organization
  5. Logical Organization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe the concept of relocation.

A

Swapping active processes in and out of memory to maximize utilization.
We cannot know ahead of time where a process may be in memory thus we must allow the possibility for processes to be swapped around for optimization.

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

Describe the concept of protection.

A

Each process must be protected from the interference of other processes.

Process need permission to acquire a space in memory.

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

Why is memory protection a hardware responsibility and not a software responsibility ?

A

This is because the OS cannot anticipate all of the memory references that a program will make. Even if such anticipation were possible, it would be prohibitively time consuming to screen each program in advance for possible memory-reference violations. Thus, it is only possible to assess the permissibility of a memory reference (data access or branch) at the time of execution of the instruction making the reference. To accomplish this, the processor hardware must have that capability.

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

-something to remember-

A

In one sense, satisfaction of the relocation requirement increases the difficulty of satisfying the protection requirement

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

True or False
Without special arrangement, a program in one process cannot access the data area of another process.

A

True

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

Describe the concept of sharing

A

This deals with allowing each process to access the same copy of the program rather than have its own separate copy. This access should be controlled so it doesn’t violate the protection requirement

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

What are three (3) benefits to using logical organization ( modules)

A
  1. Different modules can have different protection measures (modifiable and non modifiable)
  2. Modules can be shared among processes which makes it easier for users to specify the sharing that is desired
  3. Modules can be run independently
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

-something to remember-

A

Main memory is fast at a high cost and viol does not provide permanent storage.

Secondary memory is slower, cheaper and non vi

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

Why is it impractical to make a programmer responsible for the flow to and from main memory and secondary memory.

A
  1. The program and its data may be to large for main memory and in this case, the programmer will have to use a process known as overlaying to give one space in memory to multiple modules. Then has the responsibility of switching them in and out. This is very time consuming
  2. The programmer cannot know how at the time of coding, how much memory will be available and where it is available
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe Fixed Partitions

A

Main memory is divided into static partitions at system generation time. The processes are loaded into partitions that are of equal size of greater.
adv: simple to implement
disadv: insufficient use of memory

17
Q

Describe Dynamic Partitioning

A

Partitions are created dynamically so that process are loaded into partitions that are exactly the same size.

adv: sufficient use of memory
disadv: external fragmentation

18
Q

Describe Simple Paging

A

Main memory is divided into equal sized frames then a process is divided into equal size pages to match the frames. The process is loaded in by loading in all of pages into available frames.
Adv: no internal fragmentation
disadv: small external fragmentation

19
Q

Describe Simple Segmentation

A

Each process is divided into segments. Then each segment is dynamically placed into a partitions

20
Q

Describe Virtual Memory paging

A

As with simple paging but not all pages have to be brought into main memory. Non resident pages can be brought in later, automatically.

21
Q

Describe Virtual Memory Segmentation

A

As with virtual memory segmentation but not all segments have to be loaded in. Non resident segments can be loaded in at a later time, automatically.

22
Q

What is the difference between internal and external fragmentation?

A

The difference between memory allocated and required space or memory is called Internal fragmentation (fixed)

The unused spaces formed between non-contiguous memory fragments are too small to serve a new process, which is called external fragmentation. (dynamic)

23
Q

List 2 disadvantages of fixed partitioning of equal sized

A
  1. If there is a program that is two big for a partition, the program will need to overlay modules, laying modules over each other and swapping them in and out when needed.
  2. Internal Fragmentation : Wasted space that occurs when programs are smaller that the memory space allocated.
24
Q

Explain the placement algorithm for equal partitions

A

employ a queue to each partition, as long as a partition is available, load a process into, if all partitions are unavailable.
some process must be swapped out.

25
Q

Explain the placement algorithm for unequal partitions.

A

Employ a single queue to all partitions, select the smallest partition that can hold the process. If no process is available then a swapping decision needs to be made.

26
Q

Disadvantages of unequal partitioning

A
  • The number of partitions specified at system generation time limits the number of active (not suspended) processes in the system.
  • Because partition sizes are preset at system generation time, small jobs will not utilize partition space efficiently.
27
Q

What technique is used by the IBM’s mainframe operating system?

A

Dynamic Partitioning

28
Q

Name and explain the technique used to solve external fragmentation.

A

Compaction: shifting the processes so that they are contiguous and so that all of the free memory is together in one block

29
Q

Differentiate between best fit, next fit and first fit

A

Best fit choose the block closest to the size of the request.

Next fit scans memory from the location of the last placement and choose the first available block that is large enough.

First fit scans from the beginning and chooses the first available block that is large enough

30
Q

What system is used to overcome the disadvantages of the fixed and dynamic partitioning?

A

the buddy system

31
Q

-something to remember-

A

When the fixed partition scheme is used, we can expect a process will always be assigned to the same partition Whichever partition is selected when a new process is loaded will always be used to swap that process back into memory after it has been swapped out

32
Q

-something to remember-

A

For equal and unequal partitioning with a single queue. When a process image is first created, it is loaded into some partition in main memory; Later, the process may be swapped out
When it is subsequently swapped back in, it may be assigned to a different partition than the last time
The same is true for dynamic partitioning

33
Q

What 2 steps of manipulation does the relative address go through by the processor ?

A

FIrst the value in the base register is added to relative address to create an absolute address
Then the result is checked with the bounds location, if within bounds, process and if not, stop.

34
Q

What is the page table?

A

The page table is a list that contains the frame number for each page

35
Q

What maintains the page table?

A

The Operating System

36
Q

Differentiate between logical, physical and relative addresses.

A

logical address is a reference to a memory location independent
of the current assignment of data to memory.

A relative address is a particular
example of logical address, in which the address is expressed as a location relative
to some known point, usually a value in a processor register.

A physical address, or
absolute address, is an actual location in main memory.