Path: utzoo!mnetor!uunet!lll-winken!csustan!polyslo!rducky!jrp From: jrp@rducky.UUCP (JIM PICKERING) Newsgroups: comp.unix.questions Subject: Re: Dining Philosopher Program Posted Message-ID: <111@rducky.UUCP> Date: 6 Apr 88 15:27:01 GMT References: <110@rducky.UUCP> Organization: Technical Solutions, Arroyo Grande, Ca. Lines: 47 Keywords: SV semaphores, process synchronization, Dijkstra Summary: won't work on BSD unless IPC package installed In article <110@rducky.UUCP>, jrp@rducky.UUCP (JIM PICKERING) writes: > For those of you who requested the 'Dining Philosophers' program ... it has > been posted to comp.sources.misc. > > For those of you who don't know what I'm referring to ... see following: > > /***********************************************************************/ > /** PHIL.C **/ > /** **/ > /** DESCRIPTION: This file contains a program which demonstrates **/ > /** Dijkstra's Dining Philosophers Problem (see "Cooperating **/ > /** Sequential Processes," Technical Report EWD-123, Technological **/ > /** University, Eindhoven, The Netherlands, (1965)). It is con- **/ > /** sidered a classic process synchronization problem. It is **/ > /** implemented using SVR2 semaphores and curses. With this as an **/ I forgot to mention (for the novices) that most BSD systems do not have the SV Interprocess Communication Package (SUN offers it as an option, I believe). Obviously it won't run on BSD machines. Also other Unix flavors do not have IPCs. The IPC Package became available on System V (Release 2 ????). If you have the /usr/include/sys/ipc.h and /usr/include/sys/sem.h files, you have SV IPC's. jim -- Jim Pickering c/o Technical Solutions || (n) ..csustan!polyslo!rducky!jrp P.O. Box 1045 || (s) ..sdsu!polyslo!rducky!jrp Arroyo Grande, CA 93420 || ..polyslo!northway!rducky!jrp (805) 473-1037 || jrp@rducky.UUCP