SAMPLE: BNDBUF - Sample Application

PSS ID Number: Q103346
Article last modified on 08-24-1993

3.10
WINDOWS

----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows Software Development Kit (SDK) for Windows
   version 3.1
----------------------------------------------------------------------

BNDBUF: Demonstrates Distributed Bounded Buffer Solution
The BNDBUF sample demonstrates the distributed version of the
operating systems producer-consumer problem. The producers and
consumers use a centralized buffer pool managed by the remote process
control (RPC) server. Semaphores are counted to make sure that
consumptions take place when the buffer pool contains at least one
unconsumed string, and productions take place when the buffer pool
contains at least one empty slot. Access to the shared buffer pool is
synchronized by means of a mutex.
To use this program, you must first start the RPC locator service
using the following command line:
   start locator /noservice
Next, start the application server by typing:
   start bndbufs
Then, you can start multiple clients by typing
   start bndbufc
for each client to be started.
The application uses WHILE loops to run forever; you must use CTRL+C
to terminate each component.
The Microsoft® Windows NT™ version 3.1 operating system was not
available at the time this sample was acquired for the Microsoft
Developer Network CD. For this reason, the CD includes only the source
files for the sample, not the executable file or any DLLs. If you have
Windows NT version 3.1 installed on your system, you may copy the
source files to your hard drive and invoke the Windows NT make file to
build the sample.
KEYWORDS: CD4
For Microsoft OnLine customers, BNDBUF is available in the
Software/Data Library as 4X75.ZIP and can be found by searching on the
word BNDBUF, the Q number of this article, or S14277. For CompuServe
Customers, BNDBUF can be downloaded from the file 4-75.ZIP in library
section number 4 of the MSDNLIB forum. BNDBUF was archived using the
PKware file-compression utility.

Additional reference words: 3.10
KBCategory:
KBSubcategory:
Copyright Microsoft Corporation 1993.