comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin D. Condic" <mcondic-nospam@quadruscorp.com>
Subject: Re: Tasking Models
Date: 2000/04/19
Date: 2000-04-19T13:34:15+00:00	[thread overview]
Message-ID: <38FDDF83.26B5DC76@quadruscorp.com> (raw)
In-Reply-To: slrn8fr4sn.1se.gisle@apal.ii.uib.no

Gisle S�lensminde wrote:
> I may be wrong, but there are big chances for that an old Ada83
> compiler produce executables for SunOS 4, which runs on Solaris
> in compatibility mode AFAIK. I think I remember that SunOS 4 not
> supported multithreading, so if the compiler makes old executables
> there will not be threads available, and the Ada threads will
> block on OS calls.
> 
Block as in "stand here looking like an idiot doing nothing while I go
run some I/O chores for you" or block as in "Ada task 1 is blocked for
I/O - Ada task 2 can now charge off and do its thing."?

Behaviorally speaking, it *appears* to be timeslicing at least because
it doesn't seem to starve any of the tasks. Given where the software has
been and where it is going I really need to *know* what the model is or
the assumptions might kill us. If it *is* timeslicing, then under what
conditions might the expiration of a timeslice interrupt the task in the
middle of something important? Do you surround everything with mutexes?
(We don't have the luxury of protected types here and the original
designers didn't have a good grasp of tasking.)

> I either case; many of the OS calls in Solaris (esp socket calls)
> are not thread safe, so care must be taken. The thread safeness
> is documented on the manpages on all newer Solaris versions,
> and in some cases there are Solaris specific thread safe versions
> of the calls.
> 
There may be some man pages out there - I have not checked yet. There
was a "Programmers Guide" and a "Users Guide" book available, but as I
said - very pithy and not nearly enough said about tasking - or other
important issues.

I've been told that TCP/IP would sort it out - no interleaving of
message fragments at least - which would mean that two tasks writing to
the same socket would be O.K. But getting told that by someone is not
the same as reading it in a document written by the good folks who
brought you the software. I lose sleep at night over stuff like this.
:-)

MDC
-- 
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

"I'd trade it all for just a little more"
    --  Charles Montgomery Burns, [4F10]
======================================================================




  reply	other threads:[~2000-04-19  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-18  0:00 Tasking Models Marin D. Condic
2000-04-19  0:00 ` Gisle S�lensminde
2000-04-19  0:00   ` Marin D. Condic [this message]
2000-04-20  0:00     ` Simon Wright
2000-04-22  0:00       ` Marin D. Condic
2000-04-22  0:00 ` Marin D. Condic
2000-04-22  0:00   ` tmoran
2000-04-22  0:00     ` Marin D. Condic
replies disabled

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