Semaphores and shared memory's classes

Hi there,
I looking for the classes used to deal with semaphores and shared memory. Does anyone know which are these classes?
Thanks

The file mapping capability added in 1.4 may result in shared memory but this is not guaranteed. You can use JNI to call some C code which allocates shared memory and then uses the NewDirectByteBuffer method to return a ByteBuffer representing that shared memory to the Java code.
You would also need to use JNI to wrap system provided semaphore or mutex operations to provide cross process synchronization.
However, do your communication needs really require performance in excess of that available using sockets? I can get at least 7MB/s between two processes on a rather modest machine.

Similar Messages

  • What is semaphore and shared memory

    Hello Gurus,
    what is Semaphores and shared memory. what is the use of setting the parameter
    SHMMAX
    SHMMIN
    SEMMIN while installing Oracle software in Linux
    Regards
    Hameed

    Hello,
    I would advise you to review Oracle Metalink Document: Semaphores and Shared Memory - An Overview : Doc ID: Note:153961.1.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:12007188755102069423::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,153961.1,1,1,1,helvetica
    Oracle Metalink Document: TECH: Unix Semaphores and Shared Memory Explained Doc ID: Note:15566.1.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:12007188755102069423::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,15566.1,1,1,1,helvetica
    Additionally you can review Oracle Metalink Document: Linux: How to Check Current Shared Memory, Semaphore Values Doc ID: Note:226209.1.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:12007188755102069423::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,226209.1,1,1,1,helvetica
    Hope it helps.
    Adith

  • Segment memory and shared memory

    hi guys
    is it possible to know the path of "Segment memory and shared memory " on OS level...........
    i don't know exact forum for this question so i post it here
    please help me !

    If are you using Linux you can use ipcs to get all shared memory segments at system level:
    $  ipcs -m
    ------ Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status
    0x0000f47a 65536      root      777        512000     4
    0x26278554 163842     oracle    640        132120576  16
    0xac004cf0 196611     oracle    660        16108224512 128The Oracle executable sysresv uses ORACLE_SID env. var to map shared memory segment to the current instance:
    $ sysresv
    IPC Resources for ORACLE_SID "XXX1" :
    Shared Memory:
    ID              KEY
    196611          0xac004cf0
    Semaphores:
    ID              KEY
    229377          0x2dac12a4
    Oracle Instance alive for sid "XXX1"

  • Solaris 10, Oracle 10g, and Shared Memory

    Hello everyone,
    We've been working on migrating to Solaris 10 on all of our database servers (I'm a UNIX admin, not a DBA, so please be gentle) and we've encountered an odd issue.
    Server A:
    Sun V890
    (8) 1.5Ghz CPUs
    32GB of RAM
    Server A was installed with Solaris 10 and the Oracle data and application files were moved from the old server (the storage hardware was moved between servers). Everything is running perfectly, and we're using the resource manager to control the memory settings (not /etc/system)
    The DBAs then increase the SGA of one of the DBs on the system from 1.5GB to 5GB and it fails to start (ORA-27102). According to the information I have, the maximum shared memory on this system should be 1/4 of RAM (8 GB, actually works out to 7.84 GB according to prctl). I verified the other shared memory/semaphore settings are where they should be, but the DB would not start with a 5 GB SGA. I then decided to just throw a larger max shared memory segment at it, so I used the projmod to increase project.max-shm-memory to 16GB for the project Oracle runs under. The DB now starts just fine. I cut it back down to 10GB for project.max-shm-memory and the DB starts ok. I ran out of downtime window, so I couldn't continue refining the settings.
    Running 'ipcs -b' and totalling up the individual segments showed we were using around 5GB on the test DB (assuming my addition is correct).
    So, the question:
    Is there a way to correlate the SGA of the DB(s) into what I need the project.max-shm-memory to? I would think 7.84GB would be enough to handle a DB with 5GB SGA, but it doesn't appear to be. We have some 'important' servers getting upgraded soon and I'd like to be able to refine these numbers / settings before I get to them.
    Thanks for your time,
    Steven

    To me, setting a massive shared memory segment just seems to be inefficient. I understand that Oracle is only going to take up as much memory (in general) as the SGA. And I've been searching for any record of really large shared memory segments causing issues but haven't found much (I'm going to contact Sun to get their comments).
    The issue I am having is that it doesn't make sense that the DB with a 5GB SGA is unable to startup when there is an 8GB max shared memory segment, but a 10GB (and above) seems to work. Does it really need double the size of the SGA when starting up, but 'ipcs' shows it's only using the SGA amount of shared memory? I have plans to cut it down to 4GB and test again, as that is Oracle's recommendation. I also plan to run the DB startup through truss to get a better handle on what it's trying to do. And, if it comes down to it, I'll just set a really big max shared memory segment, I just don't want it to come back and cause an issue down the road.
    The current guidance on Metalink still seems to be suggesting a 4GB shared memory segment (I did not get a chance to test this yet with the DB we're having issues with).
    I can't comment on how the DBA specifically increased the SGA as I don't know what method they use.

  • ORA-01031: insufficient privileges and shared memory realm does not exist

    Hi all,
    I came to a dead end to start oracle 10.2 database. I have searched on google and this forum, none of these solutions work for me. PS, I have installed 11g on my machine too.
    I have set up ORACLE_SID,ORACLE_HOME to 10.2 database based on the tnsnames.ora.
    follow is error message:
    sqlplus sys as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 3 02:09:54 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-01031: insufficient privileges
    sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 3 02:10:55 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn / as sysdba
    ERROR:
    ORA-01031: insufficient privileges
    SQL> conn scott/tiger
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    First I thought the instance has been start yet, but since I can't login with sysdba. I don't know what other options.
    For 10.2, the tnsnames.ora
    ORA102 =
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST =XXX)(PORT = 1523))+
    +(CONNECT_DATA =+
    +(SERVER = DEDICATED)+
    +(SERVICE_NAME = ora102)+
    +)+
    +)+
    LISTENER_ORA102 =
    +(ADDRESS = (PROTOCOL = TCP)(HOST =XXX)(PORT = 1523))+
    EXTPROC_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))+
    +)+
    +(CONNECT_DATA =+
    +(SID = PLSExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /data/oracle/ora102)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    (ADDRESS = (PROTOCOL = TCP)(HOST =XXXXX)(PORT = 1523))
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )

    try do this steps on server side:
    1) sqlplus sys as sysdba
    2) select open_mode from v$database;
    show result 2 step

  • Migration 8i to 9iR2 and "Shared Memory Realm does not exist"

    Dear Experts,
    I read from Note 159657.1 in step 22
    If you are using a passwordfile set the parameter
    REMOTE_LOGIN_PASSWORDFILE=NONE (If you are using windows also set the
    parameter SQLNET.AUTHENTICATION_SERVICES=(NTS) in the sqlnet.ora file.
    The issue is I can't restart my instance in step 32 (same note) because I need to have SQLNET.AUTHENTICATION_SERVICES=(NONE) since we migrated to Active Directory.
    So...is this setting to (NTS) mandatory before migrating my database ? If Yes Should I simply set it to NTS and then set it back to NONE before re-strating my database ?
    Thanks for any advice.
    Regards,
    Guillaume

    Hi,
    "Shared Memory Realm does not exist" error might come from some initialization parameter in init.ora file not set properly most probably these are "memory" related parameters. init.ora file was configured with diffirent memory value.
    Data sheet

  • FOTRAN and Shared Memory

    I'm currently working with a large simulation involving mixed language Fortran and C executable programs (like 10 different executables running
    together in real-time).
    I now need to port the code from SUN-3 (SunOS 4.0) over to a modern Enterprise 250 server. Since I' porting I'd like to have the multitude of executables to use the POSIX compliant calls shm_open and mmap to map the appropriate common blocks. Unfortunately, my search of Dejanews and other internet sources have shown this to be a widely debated topic without much in the way of answers.
    So far, I've written fortran callable c-stubs to do the shm_open and mmap calls but I can't get mmap to successfully take the address I specify. Also since the other fortran programs will have copies of the same common blocks the obvious interface issue comes up, how to I map onto the same common block (shared memory region) for all programs?
    My target platform is UltraSparc II running Solaris 2.7. Any hints?

    One possible problem is that Fortran passes everything by reference (by
    default) and the C routines that you are calling may want some of the
    data to be passed by value.
    Another could be that the mmap doesn't want to remap the common blocks
    if they are already mapped. If that is the case, you can try mapping unused
    space and then using either Fortran 95 (preferred) or Cray pointers to point
    to the space. If you make it work with Fortran 95 pointers, you won't even
    need much in the way of syntax changes in your program.

  • Shared memory & semaphores

    Hi,
    I'm using an Ultra 10 running Solaris 8.
    I've set the /etc/system file as follow:
    set shmsys:shminfo_shmmax=4294967295
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmmni=100
    set shmsys:shminfo_shmseg=10
    set semsys:seminfo_semmni=100
    set semsys:seminfo_semmsl=100
    set semsys:seminfo_semmns=200
    set semsys:seminfo_semopm=100
    set semsys:seminfo_semvmx=32767
    forceload: sys/msgsys
    forceload: sys/semsys
    forceload: sys/shmsys
    But it seems to be ignored. The command "ipcs" return:
    IPC status from <running system> as of Tue Jun 18 08:58:13 GMT 2002
    T ID KEY MODE OWNER GROUP
    Message Queues:
    Shared Memory:
    m 0 0x50000392 rw-rr-- root root
    Semaphores:
    Due to this I can not run Oracle 8.1.7.
    What is wrong? What should I do?
    Thanks in advance for your support.
    Patrick

    I got a similar problem on Solaris 9 while trying to get Ingres to run. Ingres comes with a utility named "syscheck" that checks how many semaphores and shared memory segments are available. It complains that there are a total of 0 shared memory segments available in the system (I've set the number to 3) and that there are a total of 30 semaphores in the system (I've set the number to 35).
    However, the sysdef output shows exactly the values that are set in /etc/system. So, do I face a compatibility problem here (Ingres ran fine on Solaris 7) or is it a problem in my system configuration? How can I determine that?
    Thanks in advance
    Gregor

  • Multiple Users Accessing Shared Memory

    I created a shared memory enabled class, and it works great for a simple scenario.  But, it's currently not sufficient for my needs.  Here's an example of what I'm trying to accomplish, and the events happen in this order!
    User 1 writes data XXX to shared memory.
    User 2 writes data YYY to shared memory.
    User 1 reads from shared memory and I want him to get his data (XXX).
    User 2 reads from shared memory and I obviously want him to get his YYY.
    I do have a key I can use to differentiate my data but I don't know how to incorporate that in my process. 
    Is the solution to write a table, rather than my current simple structure, to my shared memory?  But if I do this how do I clean off the "used" row after it is read?
    Or is the solution to use some sort of instance of my class and reference the appropriate instance on each read?
    Here's my write:
      data: lo_shared_area type ref to z_cl_rdn_shared_area,
            lo_root        type ref to z_cl_rdn_memory.
    ****get a pointer to the Shared Area
      lo_shared_area = z_cl_rdn_shared_area=>attach_for_write( ).
    ****Create an instance of our root
      create object lo_root area handle lo_shared_area.
    ****Set the Initial value for our message
      lo_root->set_ptwy( ps_ptwy ).
    ****Set the root back into the Area
      lo_shared_area->set_root(  lo_root ).
    ****Commit and detatch
      lo_shared_area->detach_commit( ).
    Here's my read:
      data: lo_shared_area type ref to z_cl_rdn_shared_area,
            lo_root        type ref to z_cl_rdn_memory.
      lo_shared_area = z_cl_rdn_shared_area=>attach_for_read( ).
      lo_root        = lo_shared_area->root.
      try.
          ls_ptwy = lo_root->get_ptwy( ).
        catch cx_root.
          clear ls_ptwy.
      endtry.
      lo_shared_area->detach( ).
    Thanks,
    Mike

    Hello,
    Clearing shared memory will crash SAP   ie cleanipc.
    Need to increase memory parameters
    Check notes...
    146289    Parameter Recommendations for 64-Bit SAP Kernel   
    146528 "Configuration of R/3 on hosts with much RAM".                     
    regards,
    John Feely

  • Question on use of shared memory objects during CIF executions

    We have a CIF that runs in background via program RIMODACT that is invoked from our external job scheduler.  (The schedulere kicks off a job - call it CIFJOB - and the first step of this job executes RIMODACT.)
    During the execution of RIMODACT, we call a BAdI (an implementation of SMOD_APOCF005.)
    In the method of this BAdI, we load some data into a shared memory object each time the BAdI is called. (We create this shared memory object the first time the BAdI is called.)
    After program RIMODACT finishes, the second step of CIFJOB calls a wrapper program that calls two APO BAPI's.  
    Will the shared memory object be available to these BAPIs?
    Reason I'm asking is that the BAPIs execute on the APO app server, but the shared memory object was created in a CIF exit called from a program executing on the ECC server (RIMODACT).
    Edited by: David Halitsky on Feb 20, 2008 3:56 PM

    I know what you're saying, but it doesn't apply in this case (I think.)
    The critical point is that we can tie the batch job to one ECC app server.  In the first step of this job (the one that executes RIMODACT to do the CIF), we build the itab as an attribute of the "root" shared memory object class.
    In the second step of the batch job, we attach to the root class we built in the first step, extract some data from it, and pass these data to a BAPI that we call on the APO server.  (This is what I meant by a "true" RFC - the APO BAPI on the APO server is being called from a program on the ECC server.)
    So the APO BAPI never needs access to the ECC shared memory object - it gets its data passed in from a program on the ECC server that does have access to the shared memory object.
    Restated this way, is the solution correct ???

  • Shared memory area & triggering "client" actions

    Hi all,
    I'm playing around with shared objects, and I would like to accomplish one thing:
    I have a shared memory and a "client" class which uses it.
    When one of the instances of this client class calls a specific method of the shared memory root class, another instance of the client class should receive a message from the root class. This other instance would be running under a different user.
    Since no events are allowed for shared memory area root classes, event handling on the side of the client class is not possible. I even tried to store references to instances of the client class in the shared memory but this would not work either (surprise! surprise! - CX_SHM_EXTERNAL_REFERENCE
    So apart from periodically querying the root class from the client, is there really no way how to initialize the SHMA->client communication from the shared memory area side ?
    thanks,
    Stanislav Mikulas

    If your clients keep the read connection to the shared memory, is there a way to follow this connection back to the clients?
    But even if so, how could you trigger an event at the client?
    Actually, I think there is no solution besides polling the shared memory objects for changes periodically.

  • Shared memory settings from 32 to 64 bit Oracle

    Hello,
    Questions about Oracle and Shared Memory from 32bit to 64bit Oracle
    I have a Sun Sparc V880 server running Solaris 9 with 8xCPUs and 16gb of Ram. It is currently running 6 Oracle (32 bit) 9.2 databases which we are planning to upgrade to 10.2. My question regards the setting of the Solaris 9 kernel parameters speciifically 'shminfo_shmmax'. This is currently set to - 'shmsys:shminfo_shmmax=4294967295'which I believe is the maximum amount of shared memory which can be allocated to a 32bit version of Oracle and the one recommended by Oracle.
    Running 'show sga' on all of the current 9.2 databases returns
    Total System Global Area
    DB     SGA(bytes)
    db1     772528008
    db2     789305244
    db3     772528008
    db4     114021228
    db5     791238556
    db6     789305244
    Total = 4045703524 bytes or 3.76786 gb.
    1. Does this mean that each Oracle 32bit database can only use up to a maximum of about 4gb of shared memory or that all 6 together can only use up to 4gb ? resulting in 12gb being available for other (non Oracle) processes.
    2. I have noticed (through 'sar' stats) that the server occasionally pages (non zero values for pgscan/s and pgfree/s etc.). Since the server mostly only runs the Oracle databases, is this because Oracle can only use circa 4gb of Ram before it starts paging ?
    3. If both 9.2 and 10.2 Oracle databases are run on the server would increasing the value of shminfo_shmmax then allow the 10.2 databases to use more of the 16gb of Ram, while still limiting the 32bit databases to the 4gb limit ?
    Any help here would be appreciated

    Pl see if MOS Doc 467960.1 (How Important It Is To Set shmsys:shminfo_shmmax Above 4 GB) and the notes it references can help
    HTH
    Srini

  • Read & Write Shared memory with Java

    Hi,
    I have to read and write from/to shared memory four integers with Java, using Posix package (the shared memory is already created).
    I've looking in google for any examples that attachs, read, and write to shared memory using that package but i couldn't find anything (that's the reason to write in this forum).
    Posix package link
    http://www.bmsi.com/java/posix/docs/Package-posix.html
    Operative System
    Suse 10
    Could anyone help me with any example, please?
    Thank you very much
    Oscar

    Hi, i can't post any code because i have no idea about posix and shared memory.
    I came from web world and my company has send me to space department, two weeks ago, that use Unix as its operative system.
    The first thing i have to do it's what i post but i don't know even how to start doing it, because this is almost the first time i hear about reading and writing shared memory.
    Java is a high level and non-dependent platform (but this kind of things i think are dependent platform, in this case the opearative system) and it's few time since i am working with this operative system.
    That's the trouble i don't know how to start working with this.
    Thanks again

  • How do I set the shared memory and semaphore Parameters

    Hi, everyone:
    Could someone help me on this? The Oracle Installation Guide
    for Linux says these parameters need to be set, but does not say
    how. Thanks in advance.
    Jim
    null

    Lawrence Yeo (guest) wrote:
    : Hi,
    : Please refer to the Installation guide written by
    : [email protected] at http://jordan.fortwayne.com/oracle/.
    : I haven't successfully install oracle on my linux box, but I
    : think this installation guide is pretty good, it guide you
    step
    : by step throught experience. There is an instruction on how
    to
    : set the parameter, but that require kernel re-compile though.
    It seems this problem is getting discussed on a number of
    different threads. Here is a reply I just posted on one of
    those other threads:
    Ari Arantes (guest) wrote:: Hi,
    : I've installed Oracle on RedHat 5.2 (2.0.36) on a machine with
    : 512 mb memory.
    : First I've recompiled the kernel how Oracle says and basing in
    : some documents (like
    : http://jordan.fortwayne.com/oracle/oralinux.html). Of course
    I've
    : saved a copy of the old kernel. The linux was ok, the command
    : ipcs -l shows the new values of the kernel parameters, but
    Oracle
    : didn't start. I've restored the copy of the kernel, the ipcs -
    l
    : shows the old values and now Oracle is running, with a SGA of
    : almost 300 mb.
    : Is there some problem in that? Will the machine loose
    performance
    : because the miminum values of the kernel parameters?
    : Best regards,
    : Ari
    I have a setup similar to yours (384 MB instead of 512 MB),
    and I spent some time looking at the parameters.
    You CANNOT use the value for SHMMAX from the Oracle manual!
    As it says at http://jordan.fortwayne.com/oracle/oralinux.html
    "Should you decided to change these parameters, if you set
    the SHMMAX to what Oracle says, you are telling the system
    to allow a shared memory segment to grow as large as 4 Gigs.
    Many users have reported problems setting the value this
    high."
    Sounds like you are another one of those users, eh?
    If you read on down, the guy who wrote that web page never
    used over 128 MB for SHMMAX. I'd take a strong hint from that.
    =====
    Oracle wants you to use 4GB-1 as the SHMMAX value. That
    equates to (1<<32)-1. As we shall see, that is not allowed
    without "breaking the rules" for the i386 architecture.
    If you carefully read through the header file, you will find
    out that the **actual maximum value** for SHMMAX is 256 MB.
    You can tell this two ways. Take a look at the file at:
    /usr/src/linux/include/asm/shmparam.h
    Near the top of the file is:
    /* address range for shared memory attaches if
    no address passed to shmat() */
    #define SHM_RANGE_START 0x50000000
    #define SHM_RANGE_END 0x60000000
    Note that the above is 256 MB (0x10000000), or (1<<28). This
    is one potential source of trouble. I don't know if some other
    files someplace else in the kernel specify uses for address
    ranges adjacent to the above range, which I take to be the
    "practical maximum" without redefining that range. Personally,
    I wouldn't want to mess with the above unless I **really**
    knew what I was doing (and I'll be the first to admit I don't).
    =====
    Farther down you will see some more lines (not together)
    that look like this:
    #define SHMID_BITS 7
    #define SHMIDX_BITS 15
    * SHMID_BITS + SHMIDX_BITS must be <= 24 on the i386 and
    * SHMMAX <= (PAGE_SIZE << SHMIDX_BITS).
    #define SHMMAX 0x2000000 /* max shared seg
    size (bytes) */
    Now, 7 + 15 is 22, so you could go up a couple of bits if you
    had to. To avoid making the table any larger, I would suggest:
    #define SHMIDX_BITS 17
    But, 17 turns out to produce a result larger than the "practical
    maximum" (256 MB) above. To see why takes a little more
    explaining.
    If you don't change this at all, then the maximum possible
    value for SHMMAX is 4096 [the PAGE_SIZE) << 15 [_SHM_IDX_BITS],
    or rather (1<<27).
    Now, that is exactly half of the (1<<28) "practical maximum" I
    mentioned above.
    So, if you always want the maximum amount of shared memory,
    then change the definition of SHMMAX to the following:
    #define SHMMAX (PAGE_SIZE<<_SHM_IDX_BITS) /* max shared seg
    size (bytes) */
    That gives you 128 MB in and of itself (as compared with 32 MB
    as Red Hat 5.2 is delivered).
    If you want the full 256 MB that is allowed for in the memory
    map, then you need to also change:
    #define SHMIDX_BITS 16
    The above value is **exactly** what is recommended on the web
    page you were following (above).
    If you want to keep going up, you will need to change the
    memory space allocated for shared memory as defined by
    SHM_RANGE_START and SHM_RANGE_END, something I advise against.
    =====
    Even on a machine with 512 MB of "real" memory, I find it hard
    to believe that there would be any substantial benefit to
    having a maximum shared memory space greater than 256 MB. The
    reason is that Oracle can use multiple shared memory spaces.
    It requires a minimum of ten (10), according to the installation
    manual, but the Red Hat 5.2 distribution supplies SHMMNI (128)
    of them. That will allow each Oracle process to have a total
    of up to 32 GB of shared memory (128 times 256 MB) and all it
    asks for is 40 GB (10 times 4 GB), so it has plenty, IMHO.
    =====
    Let me say a few more words about the web page you were using
    for configuration advice. That person actually **reduced** the
    amount of shared memory segments by specifying **lower values**
    for SHMMNI and SHMSEG.
    I'd **STRONGLY** recommend **NOT CHANGING** those other values!
    Its my understanding that Oracle can make up for the smaller
    maximum shared memory segment size by using more shared memory
    segments. So, if you reduce those, you are essentially shooting
    yourself in the foot by taking away what you are giving with
    increasing the maximum segment size.
    =====
    Good luck, and may this farce be with you!
    null

  • Shared memory and ABAP

    Dear developers,
    I have some documentation on ABAP SHARED OBJECTS and I wonder how I could define shared memory objects at run time ( so I would need something like an API ) instead of using the SHMA transaction.
    I actually also wonder what would happen if 2 users of the same shared object would call on one of its methods ? Can we have concurrent access ? How does the whole locking thing works ? Is it possible to implement waiting calls/locks ?
    If you have any serious/technical documentation on semaphores/locks in SAP/ABAP I'd also be very interested.
    Sincerely,
    Olivier MATT

    Hi matt,
                This is vijay here.
                                          if you r working on frequntly changed data then you must use this locking technique.
    well jus go to se11 and make a lock object by starting initial......EZ....
    EX: EZENMARA.
    then u can fix the lock as shared or (exclusive,cumulative) or( exclusive, not cumulative)
    you can also fix the lock parameters like  specific fields.then jus save and activate.
    and when you will make a program jus call the function module enqueue_ezenmara for locking and dequeue_ezenmara for unlocking and u can get rest in my program.
    regards
    vijay
    rewards if answer is helpfull.
    TABLES: MARA.
    PARAMETER: MATNR LIKE MARA-MATNR.
    CALL FUNCTION 'ENQUEUE_EZENMARA'
    EXPORTING
       MODE_MARA            = 'S'
       MANDT                = SY-MANDT
      MATNR                =
       X_MATNR              = 'MATNR'
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
    EXCEPTIONS
      FOREIGN_LOCK         = 1
      SYSTEM_FAILURE       = 2
      OTHERS               = 3
    IF SY-SUBRC = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    WRITE: 'TABLE IS LOCKED'.
    ELSE.
    SELECT * FROM MARA WHERE MATNR = MATNR.
    WRITE:/ MARA-MATNR,MARA-ERNAM,MARA-MTART.
    ENDSELECT.
    ENDIF.

Maybe you are looking for