Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Waiting on more Wait Objects than allowed by the Operating System

IP.com Disclosure Number: IPCOM000118248D
Original Publication Date: 1996-Nov-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 2 page(s) / 68K

Publishing Venue

IBM

Related People

Belna, J: AUTHOR [+4]

Abstract

Disclosed is an algorithm that allows an application to wait on more wait objects than allowed by the operating system. The algorithm rotates among subgroups of wait objects to provide sufficient wait opportunity within a specified timeout period.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Waiting on more Wait Objects than allowed by the Operating System

      Disclosed is an algorithm that allows an application to wait on
more wait objects than allowed by the operating system.  The
algorithm rotates among subgroups of wait objects to provide
sufficient wait opportunity within a specified timeout period.

      Operating systems typically provide a facility that can be used
to wait on multiple wait objects such as events or semaphores for a
specified timeout interval.  In OS/2*, for example, the
DosWaitMuxWaitSem call is used to wait on multiple events.  Windows
NT** has a similar facility.  Operating systems usually have a
limitation on the number of objects that can be simultaneously waited
on with one Application Programming Interface (API) call.  OS/2 and
Windows NT allow a maximum of 64 wait objects to be waited on with a
single call.  Applications frequently need to wait on more objects
than the maximum limit allowed by one operating system API call.
This is particularly true when implementing a subsystem that provides
asynchronous services to general user applications.

      When the number of requested wait objects exceeds the operating
system maximum per API call, then the following algorithm can be
used:
  1.  The number of requested wait objects is divided into
       subgroups where the number of wait objects in each
       subgroup is equal to the operating system maximum per
       wait call.  If the objects do not divide evenly then one
       of the subgroups will have less objects.  The beginning
       wait object for subgroup 1 is randomly determined.  Since
       subgroup 1 is waited on first, this ensures that the
       algorithm does not favor the first objects of the requested
       wait object list if the same list is used repeatedly.
  2.  The wait time per subgroup is the minimum of the following:
      o  reasonable subgroup wait timeout
          A number that is specified by the implementer of this
          algorithm.  This number is used to prevent wai...