- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: shared memory
Operating System - HP-UX
1753792
Members
7067
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2009 03:10 AM
тАО01-03-2009 03:10 AM
shared memory
Hi,
1) what is shared memory segment and semaphores.what is the impact of SHMMAX on application.
2)what is the imprtance of semaphores for Database
Regards
Rkumar
1) what is shared memory segment and semaphores.what is the impact of SHMMAX on application.
2)what is the imprtance of semaphores for Database
Regards
Rkumar
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2009 04:06 AM
тАО01-03-2009 04:06 AM
Re: shared memory
Shared memory is how you can have multiple process communicate. Or keep data in memory a in Oracle's SGA. It stays after all of the processes finish.
You can use semaphores to synchronize access to shared resources.
SHMMAX is the maximum size of any shared memory segment. In 32 bit, the number is much smaller due to the fact that there is one global address space that is normally two 1 Gb quadrants.
To see your segments or semaphores:
ipcs -ma
ipcs -sa
You can use semaphores to synchronize access to shared resources.
SHMMAX is the maximum size of any shared memory segment. In 32 bit, the number is much smaller due to the fact that there is one global address space that is normally two 1 Gb quadrants.
To see your segments or semaphores:
ipcs -ma
ipcs -sa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2009 06:05 AM
тАО01-03-2009 06:05 AM
Re: shared memory
>what is shared memory segment and semaphores.what is the impact of SHMMAX on application.
dedicated memory:
When you call a malloc you can memory which can be used by only the program which calls malloc, the memory manager makes sure that the data stored in this memory is not accessible to other programs running on the system.
Shared memory:
There may be cases where you want to share data kept in memory between two different programs, In such cases you ask the OS for shared memory segments(call shmget), these segments are such that every program can see this memory and read/write data to it.
Now we know that shared memory is visible to many different programs which may want to read/write the data stored in shared memory.
a program may sometime want exclusive access to the shared memory segment at a times so what all programs do(they are coded like that) is create a semaphore and fix a protocol as:
before doing operations on shared memory which required exclusive access you need to take the semaphore so that everybody else knows that smbdy is using it and do not use the memory in exclusive mode.
Its like trial rooms in clothing stores:
The trials rooms are shared memory and a ring outside the room is the semaphore.
Before entering the room you chk for the ring if its there you take the ring and enter if its not it means that sombdy is using the room and you have to wait.
Maybe a bad example but that is what it is.
SHMMAX is already explain by D.
-Sri
dedicated memory:
When you call a malloc you can memory which can be used by only the program which calls malloc, the memory manager makes sure that the data stored in this memory is not accessible to other programs running on the system.
Shared memory:
There may be cases where you want to share data kept in memory between two different programs, In such cases you ask the OS for shared memory segments(call shmget), these segments are such that every program can see this memory and read/write data to it.
Now we know that shared memory is visible to many different programs which may want to read/write the data stored in shared memory.
a program may sometime want exclusive access to the shared memory segment at a times so what all programs do(they are coded like that) is create a semaphore and fix a protocol as:
before doing operations on shared memory which required exclusive access you need to take the semaphore so that everybody else knows that smbdy is using it and do not use the memory in exclusive mode.
Its like trial rooms in clothing stores:
The trials rooms are shared memory and a ring outside the room is the semaphore.
Before entering the room you chk for the ring if its there you take the ring and enter if its not it means that sombdy is using the room and you have to wait.
Maybe a bad example but that is what it is.
SHMMAX is already explain by D.
-Sri
abandon all hope, ye who enter here..
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP