Download presentation
Presentation is loading. Please wait.
1
CS 551-Memory Management1 Learning Objectives Centralized Memory Management -review Simple Memory Model Shared Memory Model Distributed Shared Memory Memory Migration
2
CS 551-Memory Management2 Review of Centralized Memory Management Virtual memory –Extending the size of available memory beyond its physical size of RAM –Paging versus segmentation –Internal versus external fragmentation –Segment placement algorithms –Page replacement algorithms page faults and thrashing
3
CS 551-Memory Management3 Simple Memory Model In Simple Memory Model access times for all processors are equal. Requires strict control of degree of multi- programming. Often does not use virtual memory or caching because of overhead.
4
CS 551-Memory Management4 Shared Memory Model Used for inter-process communication. Multiple processes share memory locations. May includes physical RAMs, local cache, and secondary storage. Memory access takes place via common bus thus a possibility of a bus contention.
5
CS 551-Memory Management5 Bus Contention Bus contention occurs when the demand for bus access is excessive. Bus contention may cause a bottleneck in a shared memory system. Shared memory model usually does implement more than 32 processors on a single bus.
6
CS 551-Memory Management6 Shared Memory Support UNIX System V supports shared memory via the following function calls: –shmget –shmatshmat –shmdt
7
CS 551-Memory Management7 Shared Memory Performance Performance is an important issue in a Shared Memory System. Important issues: –scalability - ability to accommodate growth without sacrificing performance –real time needs overlap of communication and computation prefetching of data (? Answer problem 4.5., p.102) –non-local memory references are expensive (up to 10:1 ratio)
8
CS 551-Memory Management8 Cache Consistency Consistency is a term used to describe the function ensuring that all data copies are the same and correct. Consistency protocols: –critical section approach –prevention of shared memory caching –snoopy cache (see fig 4.3. p. 89)
9
CS 551-Memory Management9 Distributed Shared Memory Concept introduced in 1989. DSM presents a logical shared memory for multi-computer systems. DSM maintains communication and data consistency for applications. Usually portions of local memory are mapped onto DSM. DSM maintains a directory service for all data residing in the system.
10
CS 551-Memory Management10 Distributed Shared Memory Management DSM Management involves two main decisions: –How to distribute shared data ? –How many readers and writers should be allowed for a shared data segment?
11
CS 551-Memory Management11 Distributing Shared Data Replication –maintaining multiple copies of shared data at various locations Migration –moving the copy of shared data to various locations (only one copy of shared data is allowed)
12
CS 551-Memory Management12 Readers/Writers Protocols for Shared Data Single Reader/Single Writer Multiple Reader/Single Writer Multiple Reader/Multiple Writer
13
CS 551-Memory Management13 Single Reader/Single Writer Allows one reader or one writer for a shared data set (inhibits concurrency). Replication is NOT allowed. Both centralized and distributed algorithms are used to control DSM.
14
CS 551-Memory Management14 Multiple Reader/Single Writer Allows multiple readers but only one writer to a shared data set. Consequently it allows for multiple copies of a shared data set. If the writer changes the shared data, the readers’ copies are no longer accurate. This requires an invalidation protocol.
15
CS 551-Memory Management15 Invalidation protocols for multiple reader/single writer Copy Set - is a list of system participants that have a copy of each piece of data. Invalidation protocols: –centralized –partially distributed –distributed ? Study figures 4.4, 4.5 and 4.6 p.93 and explain them.
16
CS 551-Memory Management16 Static and Dynamic Multiple Reader/Single Writer Protocol Study Box 4.3 and Box 4.4 page 94. ? Compare and contrast the algorithms and state the most important commonalities and differences? Homework for 3/1/00
17
CS 551-Memory Management17 Centralized Multiple Reader/Single Writer Protocol ? Answer question 4.6. p.103? ? Write an algorithm for centralized MR/SW problem based on Fig.4.4. and trace your algorithm for request sequence from problem 4.7. p.103?
18
CS 551-Memory Management18 Multiple Reader/Multiple Writer Allows for multiple copies of the same data and for concurrent writes to multiple copies. Not only the data needs to be validated but also it needs coordination for multiple updates. Automated solutions are possible for some applications only, and they require a sequencer, i.e. an algorithm for ordering all read and write requests.
19
CS 551-Memory Management19 DSM Performance Issues to be considered: –Thrashing How to avoid thrashing, i.e. the situation where data constantly travels between various locations? –Selection of a block size What is the best size for sharable data block? (page size, packet size, segment size?) –Location of data Which is the best original site for shared data location? –Implementation location for DSM Where should be DSM implemented? (hardware or software or both)
20
CS 551-Memory Management20 Memory Migration Memory Migration requires two fundamental decisions: –When in the migration process will we migrate memory? –How much memory needs to be migrated?
21
CS 551-Memory Management21 Memory Migration Protocols Stop-and-copy. Concurrent-copy. Copy-on-reference –two approaches: data stays at origin, data is copied to file server. ? Study fig. 4.8, 4.9 and 4.10 p.99 and answer problem 4.8 p. 103.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.