Skip to Main Content
IBM Z Hardware and Operating Systems Ideas Portal


This is the public portal for all IBM Z Hardware and Operating System related offerings. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Workspace z/OS
Categories LE
Created by Guest
Created on Jan 15, 2019

Support Posix semaphores

The Posix semaphore mechanism (defined by these APIs: sem_open/sem_close/sem_unlink/sem_trywait/sem_wait/sem_timedwait/sem_post/sem_init/sem_destroy/sem_getvalue) is an alternative to the XSI semaphore mechanism currently implemented in z/OS. Posix semaphores are easier to use than XSI semaphores, and are not limited in the number that can be created.

Providing this mechanism in z/OS would make it easier to port open source software to z/OS. While it is possible to emulate Posix semaphores with XSI semaphores, it is awkward, and can only be done with limitations.

Idea priority High
  • Guest
    Reply
    |
    Jan 17, 2019

    At the request of IBMer Timothy Sipples I am adding these additional notes regarding the need for Posix semaphores.

    Stackoverflow offers a nice little comparison between XSI and Posix semaphores here:

    https://stackoverflow.com/questions/11058045/differences-between-semaphore-h-and-sys-sem-h

    Stevens & Rago, in "Advanced Programming in the Unix Environment", section 15.8:

    http://www.apuebook.com/toc3e.html

    provide these comments:

    1. A semaphore is not simply a single non-negative value. Instead, we have to define a semaphore as a set of one or more semaphore values. When we create the semaphore, we specify the number of values in the set.

    2. The creation of a semaphore (semget) is independent of its initialization (semctl). This is a fatal flaw, since we cannot atomically create a new semaphore set and initialize all the values in the set.

    3. Since all forms of XSI IPC remain in existence even when no process is using them, we have to worry about a program that terminates without releasing the semaphores it has allocated. The undo feature that we describe later is supposed to handle this.

    Unix System Services Planning, in the section "Managing Interprocess Communication (IPC)":

    https://www.ibm.com/support/knowledgecenter/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxb200/ipcm.htm

    notes that:

    Users can invoke applications that create IPC resources and wait for IPC resources. IPC resources are not automatically released when a process is ended or a user logs off. Therefore, it is possible that an IPC user might need assistance to do either of the following:

    * Remove an IPC resource using the shell's ipcrm command

    * Remove an IPC resource using the shell's ipcrm command to release a user from an IPC wait state

    This last reference just hints at another problem: semaphores are a limited resource, and if they are not properly cleaned up, they can be exhausted. The "Troubleshooting" page for IBM's implementation of node.js refers to this:

    https://www.ibm.com/support/knowledgecenter/en/SSTRRS_6.0.0/com.ibm.nodejs.zos.v6.doc/troubleshoot.htm

    Node.js uses z/OS UNIX System Services semaphores. If the Node.js runtime ends unexpectedly, stale semaphores might be left on the system, potentially resulting in a lack of available semaphores for invoking more Node.js instances. Currently, you must manually clean up stale semaphores, by using the ipcrm command. Too many stale semaphores results in the following node assert or error:

    CEE3204S The system detected a protection exception (System Completion Code=0C4).
    From entry point _ZN4node6AssertEPA4_KPKc at compile unit offset
    +0000000025F3AC86 at entry offset +00000000000000BE at address
    0000000025F3AC86.

  • Guest
    Reply
    |
    Jan 16, 2019

    Due to processing by IBM, this request was reassigned to have the following updated attributes:
    Brand - Servers and Systems Software
    Product family - z Systems Software
    Product - z/OS
    Component - LE
    Operating system - IBM z/OS
    Source - ISV (Independent Software Vendor)

    For recording keeping, the previous attributes were:
    Brand - Servers and Systems Software
    Product family - z Systems Software
    Product - z/OS
    Component - USS
    Operating system - IBM z/OS
    Source - ISV (Independent Software Vendor)

  • Guest
    Reply
    |
    Jan 15, 2019

    It is important for IBM to close gaps in z/OS Unix support so that more software can be used on the platform. This is a good example of such a gap.