Classroom slides memory systems - PowerPoint PPT Presentation

1 / 52
About This Presentation
Title:

Classroom slides memory systems

Description:

Consider a memory system with a 32-bit virtual address. Let ... Belay's MIN. Could lead to anomalous behavior. None. FIFO. COMMENTS. HARDWARE ASSIST. ALGORITHM ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 53
Provided by: compu62
Category:

less

Transcript and Presenter's Notes

Title: Classroom slides memory systems


1
Classroom slides memory systems
2
(No Transcript)
3
(No Transcript)
4
(No Transcript)
5
PCB
  • enum state_type new, ready, running,
    waiting, halted
  • typedef struct control_block_type
  • enum state_type state
  • address PC
  • int reg_fileNUMREGS
  • struct control_block next_pcb
  • int priority
  • address memory_footprint ????
  • .
  • .
  • control_block

6
(No Transcript)
7
PCB
  • enum state_type new, ready, running,
    waiting, halted
  • typedef struct control_block_type
  • enum state_type state
  • address PC
  • int reg_fileNUMREGS
  • struct control_block next_pcb
  • int priority
  • address memory_footprint ????
  • .
  • .
  • control_block

8
Fixed size partitions
9
(No Transcript)
10
Variable size partitions
11
(No Transcript)
12
New request P4 needs 4K Possible?
13
(No Transcript)
14
(No Transcript)
15
Compaction
16
Paging and virtual memory
17
Physical Memory
LOW
12
Page Table
Users view
15
Page 0
35
Page 1
52
12
Page 2
Page 3
15
35
52
HIGH
18
Address translation
Virtual Address
Physical Address
Memory
VPN
Page offset
PPN
Page offset
CPU
PPN
Page table
19
  • Example 1
  • Consider a memory system with a 32-bit
    virtual address. Let us assume the pagesize is
    8K Bytes.
  • Example 2
  • Consider a memory system with 32-bit virtual
    addresses and 24-bit physical memory addresses.
    Assume that the pagesize is 4K Bytes. Show the
    layout of the virtual and physical addresses.
    How big is the page table? How many page frames
    are there in this memory system?

20
(No Transcript)
21
PCB
  • enum state_type new, ready, running,
    waiting, halted
  • typedef struct control_block_type
  • enum state_type state
  • address PC
  • int reg_fileNUMREGS
  • struct control_block next_pcb
  • int priority
  • address PTBR
  • .
  • .
  • control_block

22
(No Transcript)
23
(No Transcript)
24
Freelist
25
Frame Table
26
Disk Map
27
  • Example
  • process P1 page fault at VPN 20.
  • free-list is empty.
  • selects page frame PFN 52 as the victim.
  • frame currently houses VPN 33 of process P4.

28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
FIFO Page Replacement
32
Consider a string of page references by a
process Reference number 1 2 3 4 5
6 7 8 9 10 11 12 13
-------------------------------
--------------------------- Virtual page number
9 0 3 4 0 5 0 6 4 5 0
5 4 Assume there are 3 physical frames.
33
Reference 1 (PF)
Reference 2 (PF)
9
Head
9
Head
free
0
Full false
Full false
free
free
Tail
Tail
Reference 3 (PF)
Reference 4 (PF)
9
4
Head
Head
0
0
Full true
Full true
3
3
Tail
Tail
Reference 5 (HIT)
Reference 6 (PF)
4
4
Head
Head
0
5
Full true
Full true
3
3
Tail
Tail
34
Consider a string of page references by a
process Reference number 1 2 3 4 5
6 7 8 9 10 11 12 13
-------------------------------
--------------------------- Virtual page number
9 0 3 4 0 5 0 6 4 5 0
5 4
35
Beladys Min
Consider a string of page references by a
process Reference number 1 2 3 4 5
6 7 8 9 10 11 12 13
-------------------------------
--------------------------- Virtual page number
9 0 3 4 0 5 0 6 4 5 0
5 4
36
LRU
37
Consider a string of page references by a
process Reference number 1 2 3 4 5
6 7 8 9 10 11 12 13
-------------------------------
--------------------------- Virtual page number
9 0 3 4 0 5 0 6 4 5 0
5 4 Assume there are 3 physical frames.
38
Reference 1 (PF)
Reference 2 (PF)
9
Top
0
Top
free
9
free
Bottom
free
Bottom
Reference 3 (PF)
Reference 4 (PF)
3
Top
4
Top
0
3
9
Bottom
0
Bottom
Reference 5 (HIT)
Reference 6 (PF)
0
Top
5
Top
4
0
3
Bottom
4
Bottom
39
Approximate LRU with ref bits
40
(No Transcript)
41
Optimizations
victim
42
(No Transcript)
43
(No Transcript)
44
(No Transcript)
45
(No Transcript)
46
TLB
47
(No Transcript)
48
(No Transcript)
49
TLB Hit
Physical Memory
CPU
VPN
Offset
TLB
VPN
PPN
PPN
Offset
VPN
PPN
VPN
PPN
VPN
PPN
VPN
PPN
Page Table
VPN
PPN
50
TLB Miss
Physical Memory
CPU
VPN
Offset
TLB
VPN
PPN
PPN
Offset
VPN
PPN
VPN
PPN
VPN
PPN
VPN
PPN
Page Table
VPN
PPN
51
TLB Hit
Physical Memory
CPU
Page
Offset
TLB
Page
Frame
Frame
Offset
Page
Frame
Page
Frame
Page
Frame
Page
Frame
Page Table
Page
Frame
52
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com