OS Lesson 7: Memory Management Unit (video)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/45

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

46 Terms

1
New cards

Memory Management Unit

It is a hardware device that maps virtual/logical to physical address

2
New cards

Memory Management Unit Scheme

The value in relocation register is added to every address generated by the user process at the time it is sent to memory

3
New cards

user program

It always deals with the logical address; it never sees the real physical address.

4
New cards

Fetch strategies, Placement strategies, and Replacement strategies

3 Categories in Memory Management Strategies

5
New cards

Fetch Strategies

  • Demand or anticipatory

  • Decides which piece of data to load next

6
New cards

Placement Strategies

Decides where in main memory to place incoming data

7
New cards

Replacement Strategies

Decides which data to remove from the main memory to make more space.

8
New cards

Logical address space

- Generated by the CPU; also referred to as virtual address

- The set of all logical addresses generated by the program.

9
New cards

Physical address space

- Address seen by the memory unit

- The set of all physical addresses generated by the program.

10
New cards

compile time and load time

The logical and physical address are the same in ________________ and _______________ address-binding scheme.

11
New cards

execution time

The logical and physical address are different in ______________________ address-binding scheme.

12
New cards

Contiguous and Non Contiguous Allocation

Ways of organizing program in Memory

13
New cards

Contiguous

- Program must exist as a single block of contiguous address.

- Sometimes it is impossible to find large enough block.

- Low overhead.

14
New cards

Non Contiguous

- Program is divided into chunks called segment.

- Each segment can be placed in different parts of memory.

- Easier to find “holes” in which segment it will fit.

15
New cards

Holes

Empty space

16
New cards

Swapping

A mechanism in which a process can be swapped temporarily out of main memory to secondary memory and later again swaps back to main memory.

17
New cards

Fragmentation

A process are loaded and removed from memory, the free memory space is broken into little pieces.

18
New cards

Fragmentation

The problem in which the memory block remains unused.

19
New cards

External Fragmentation and Internal Fragmentation

2 Types of Fragmentation

20
New cards

External Fragmentation

Total memory space is enough to satisfy a request or reside a process in it, but it is not contiguous, so it cannot be used.

21
New cards

Internal Fragmentation

Memory block assigned to process is bigger. Some portion of memory is left unused, as it cannot be used by another process.

22
New cards

compaction or shuffle

External fragmentation can be reduces by _________________ or _______________ free memory together is one large block.

23
New cards

Internal Fragmentation

It can be reduced by effectively assigning the smallest partition but large enough for the process.

24
New cards

Program

A collection of segments

25
New cards

Segment

A logical unit such as main program, procedure, function, local variable, global variable, common blocks, stacks, symbol table, arrays, and etc.

26
New cards

segment name and segment offset

What are the 2 quantities that the user specifies in each address?

27
New cards

<segment #, offset>

logical address

28
New cards

Segment number and segment offset

2 tables in logical address

29
New cards

Segment table

It maps 2 dimensional physical address which are base and limit

30
New cards

Base

It contains the starting physical address.

31
New cards

Limit

It specifies the length of segment.

32
New cards

Segment Table Base Register (STBR)

It points to the segment table’s location in memory.

33
New cards

Segment-table length register (STLR)

- Indicates number of segments used by program.

- Segment number s is legal if segment < STLR.

34
New cards

Paging

It is a non contiguous allocation

35
New cards

Virtual Memory

- To provide easy to the users

- To increase the CPU utilization

36
New cards

Operating System

Giving illusion to the user such that:
- user can write a very big program

- user thinks that its entire program is present in RAM.

- All the space allocated to the use is contiguous.

37
New cards

small portion, present in the secondary memory

In reality only a __________________ of the user program is in RAM, which may or may not be contiguous while the remaining program is _________________________________________.

38
New cards

Virtual memory

It is the extra memory that a computer can add than the amount physically installed on the system.

39
New cards

Paging

A memory management technique in which process add space is broken into blocks of same size.

40
New cards

power of 2

Size should always be in the ________________.

41
New cards

Frames

Main memory is divided into small fixed blocks (physically) of memory called _______________.

42
New cards

size of frame = size of page

It is to avoid external fragmentation

43
New cards

logical address = page number + page offset

Page address is logical address and represented by ___________________________________________.

44
New cards

physical address = frame number + page offset

Frame address is called physical address and represented by ___________________________________________.

45
New cards

Paging

It reduces external fragmentation but still suffer from internal fragmentation

46
New cards

Paging reduces external fragmentation but still suffer from internal fragmentation, It is simple to implement, Swapping becomes very easy, and It is not suitable for small RAM’s

Paging Advantages and Disadvantages