comp.lang.ada
 help / color / mirror / Atom feed
From: haven.umd.edu!uvaarpa!software.org!stluka@purdue.edu  (Fred Stluka)
Subject: Re: Ada and Unix--Blocked Tasks
Date: 5 Aug 91 15:25:41 GMT	[thread overview]
Message-ID: <1991Aug5.152541.21340@software.org> (raw)

In article <1991Jul30.193558.9118@beach.csulb.edu> lewicki@beach.csulb.edu (Dav
e Lewicki) writes:
> 
>   I have run up against a problem:      
> 
>   I am working on a program with multiple tasks, one of which makes
>   a call on the Unix "accept()" routine for sockets.  As expected,
>   the task blocks and waits for a connection.  
> 
>   But, what I didn't expect is that the other tasks all block too and 
>   the Ada kernel then goes on to complain about deadlock.  It seems that
>   all the tasks are of the same process, so when one blocks, they all
>   do.  The only workaround that I can figure is to poll a non-blocking
>   "accept()" every 5 seconds or so (yecch).
> 
>   Is this a vendor specific problem, or do all Ada/Unix kernals work
>   this way?  I am using the Verdix compiler running on Ultrix.

Just as an additional point of data...

VAX Ada on VMS has a similar problem.  All tasks of an Ada program
run in the same process.  When a call to a system service causes the 
process to be blocked, then all tasks are blocked.  For this reason,
DEC provides a package called TASKING_SERVICES which provides access
to the same system services in a mode where only the calling task is
blocked.  This was easy for them to do because the VMS system services 
have 2 modes, blocking and non-blocking, and the non-blocking mode can 
be directed to generate an interrupt when it completes.  No polling is
required.

Non-portable, but it works.
--Fred
-- 
Fred Stluka                               Internet: stluka@software.org
Software Productivity Consortium          UUNet:    ...!uunet!software!stluka
2214 Rock Hill Rd, Herndon VA 22070 USA   Voice:    (703)742-7236

             reply	other threads:[~1991-08-05 15:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-08-05 15:25 Fred Stluka [this message]
  -- strict thread matches above, loose matches on Subject: below --
1991-08-16 15:43 Ada and Unix--Blocked Tasks bu.edu!inmet!offer
1991-08-14 15:24 torolab4.vnet.ibm.com!jrussell
1991-08-10  4:59 Robert I. Eachus
1991-08-07  1:35 Bob Kitzberger @midnight
1991-08-06 20:12 mcsun!corton!chorus!nocturne.chorus.fr!jloup
1991-08-06 18:48 Mike Murphy
1991-08-06 17:23 David Emery
1991-08-06 14:57 Drew Johnson
1991-08-06 14:32 Dan L. Pierson
1991-08-06 14:17 mcsun!corton!chorus!nocturne.chorus.fr!jloup
1991-08-06 12:32 Arthur Evans
1991-08-06  9:17 Jim Showalter
1991-08-06  4:05 Mike Feldman
1991-08-05 19:56 Howard E. Turner, Jr.
1991-08-05 19:04 EDWARD CRAGG
1991-08-05 16:06 David Emery
1991-08-05 14:14 Paul Stachour
1991-08-05  5:08 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.e
1991-08-02 18:17 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!cs.u
1991-08-02 13:28 Dennis Doubleday
1991-07-30 19:35 Dave Lewicki
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox