From: flynn@acf2.UUCP (Susan Flynn)
Subject: Re: synchronous v. asynchronous I/O
Date: 14 Jan 88 23:10:00 GMT [thread overview]
Message-ID: <9770009@acf2.UUCP> (raw)
In-Reply-To: 8801112034.AA19297@ajpo.sei.cmu.edu
P. S. Tuffs writes:
>Help!
...
> I came across a problem on the
> Alsys system where once entry of a data field was started, the other
> tasks in the system freeze, and the PC seems to be totally dedicated to
> handling the user input.
...
> What gives? Am I missing something big, or does Ada not care whether a
> single task performing Text_IO calls can block the reset of a system?
...
> I would appreciate any
> comments on this dilemma.
Goes on to gives an example program including the declaration:
Shared_Variable: Integer := 0;
Jim Moody explains:
...
> Section 9.11 says that if one task
> updates a shared variable, another should not without explicitly synchron-
> izing with the first. standard_input is a shared variable.
...
So is Shared_Variable and it is for precisely this
reason that the program as written is erroneous and all of
the compilers tested behave correctly: Shared_Variable is
not declared in a pragma SHARED; Task_A and Task_Blk do not
synchronize until the rendezvous Stop; therefore, it is
erroneous for BOTH tasks to be accessing Shared_Variable
before the rendezvous. (Further, the effective store of
Shared_Variable need not be done by A_Task until the start
of the rendezvous, so it is perfectly legal for Shared_Variable
to have the value 0 before that time.)
However, I doubt that the compilers would behave
differently if a pragma SHARED(Shared_Variable) statement was
added -- most uniprocessor compilers do not differentiate
between shared variables that are declared in a pragma SHARED
and those that are not.
I was not surprised that many of the compilers did not
context switch when a task does I/O, but I was surprised that
adding priorities did not help, since Ada requires a preemptive
scheduler, i.e. it cannot be the case that a task of lower
priority is running while a ready-to-run task of higher priority
is not. (Does the Meridian compiler use the trick of only
supporting a single priority so that any scheduling discipline
vacuously satisfies this requirement?)
Susan Flynn
flynn@acf2.nyu.edu
Relay-Version: version nyu B notes v1.5 12/10/84; site acf3.NYU.EDU
From: dube@acf3.NYU.EDU
Date: 14-Jan-88 18:34 EST
Date-Received: 14-Jan-88 18:34 EST
Subject: Re: Heightism
Message-ID: <22460001@acf3.NYU.EDU>
Path: acf3!dube
Newsgroups: soc.women
Posting-Version: version nyu B notes v1.5 12/10/84; site acf3.NYU.EDU
Organization: New York University
References: <11604@sri-unix.SRI.COM>
I read an article about height v. salary among U.S. men.
Taller meant more money, up to 6'4", at which point it started
slowly decreasing.
Typically, the victorious Presidential candidate in November is taller
than the loser.
Ira Kaplan
prev parent reply other threads:[~1988-01-14 23:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1988-01-11 19:13 synchronous v. asynchronous I/O Jim Moody, DCA C342
1988-01-14 23:10 ` Susan Flynn [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox