cmidi
cmidi

Reputation: 2010

what is a named memory block

I know that, in general, a named memory block is shared memory which you can assign and access by a name. What I want to know is what are the advantages of using a named block of memory and when should it be used in terms of memory management ?

Upvotes: 1

Views: 564

Answers (1)

user3344003
user3344003

Reputation: 21627

What you are describing has different names depending upon the operating system. It is a range of pages that can be mapped to the address space of multiple processes. It really has two components:

1) The storage in the page file

2) The physical memory--with paging, there might not be physical memory associated with it all the time.

The name serves as the way of identifying the shared memory so that it can be mapped to the process address space.

It is used for sharing data between processes. They were very commonly used with database systems. They are the fastest method of interprocess communication but require some kind of locking mechanism that the application has to implement. Often they are used with on writer and multiple readers.

If processes A&B map to the shared memory block, and process A writes to the block, B immediately sees the change.

Upvotes: 1

Related Questions