TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Matthew Heaney <[log in to unmask]>
Sat, 24 Apr 1999 15:00:19 -0700
text/plain (32 lines)
Blue Herring <[log in to unmask]> writes:

> One issue I had, was that I read somewhere that protected procedures
> and so forth, when executed, will run until completed, and not be
> interrupted by time slicing and so forth.

This statement is incorrect.  A protected operation gives you exclusive
access to a resource, that's all.

> This certainly does the job, but as a learned friend of mine pointed
> out, Ada protected types are meant to passively guard critical section
> data, but time slicing in the middle of execution would be fine, as
> long as mutual exclusion was maintained.


> Is there a specific way this happens in the 95 standard, or is it
> implementation dependent?

Read the Ada95 Rationale for the gory details about "bounded priority
inversion" and spin-locks.

> I'm also curious if there is a compiler out there which does enforce
> consistant time slicing, since Gnat supposedly doesn't.

Forget time-slicing.  Forget round-robin scheduling.

Don't confuse "concurrency" with "parallelism."