comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian_drummond@btconnect.com>
Subject: Re: Efficiency of code generated by Ada compilers
Date: Sat, 14 Aug 2010 11:47:27 +0100
Date: 2010-08-14T11:47:27+01:00	[thread overview]
Message-ID: <jvqc66t42m4ek5rkpj59ctu3r75fb4hln2@4ax.com> (raw)
In-Reply-To: op.vheielzsule2fv@garhos

On Sat, 14 Aug 2010 02:02:35 +0200, Yannick Duch�ne (Hibou57)
<yannick_duchene@yahoo.fr> wrote:

>Le Sat, 14 Aug 2010 01:29:56 +0200, <tmoran@acm.org> a �crit:
>>   The Burroughs machines were like that.  The descriptor pointing to
>> an array included the size as well as the base address, so index in-range
>> was automatically checked by the hardware.
>So these old machines were in some way safer than ones of nowadays
>
>A similar thing exist with Intel CPUs : memory segment are defined using a  
>base and a limit. This may be feasible to assign a memory segment to each  
>array and then get the same check done (an hardware exception would be  
>raised if ever an attempt to access a byte beyond the limit was maid),  
>while this would come with a cost, at least the one to have to switch  
>memory segment register all the time (this is more costly than reading and  
>writing any other register).

I believe that was the serious intent behind the segments on the 80286, but I
don't know of any software that took full advantage of it (the 8086 segments
were just a hack to address a whole megabyte!). Possibly OS/2 did, at the
process level, but nothing at the object level within application software. 
(The segments also offered privilege levels, so your app couldn't corrupt a
kernel segment). But you're right, there were an extra few cycles penalty
incurred in using 80286 "protected" mode, and at the time, that mattered to
users.

I expect that penalty would be completely hidden by a cache line load nowadays,
if the facility had been used heavily enough to justify improving it, instead of
regarding it as an expensive aberration and letting it quietly atrophy.

>I found a nice page about Burroughs machines and others:
>http://www.cs.virginia.edu/brochure/museum.html

Allegedly the Intel 432 chips pictured there were intended specifically to
target Ada, and the 286 inherited its segments from them(possibly with B5000
influence) as the 432 feature most worth saving, with the smallest
implementation penalty.

I once had my hands on a set of 432 datasheets - its slowness appears to have
largely been the result of pushing a huge microcode word across a 16-bit bus, to
save pins on the very expensive custom packages (before PGA packages).

I was involved with the Linn Rekursiv processor (which I'm sure at least two
other group regulars remember) which used 299-pin packages (2 of them plus a
223-pin) for enough connectivity to overcome most of the 432's problems. There
were some similarities between the two processors otherwise.
In a single cycle, one small corner of the Rekursiv would perform both range
checks and type checks, in parallel with whatever the ALU was doing on the real
data.

At the time it was billed as the most complex processor in existence, but if you
look at the complexity of the hardware needed to support safety and security
without additional execution time, it is pretty much invisible next to a
superscalar scheduler, branch prediction, or L1 cache. The entire Rekursiv was
about 70k gates + memory, next to a contemporary RISC of around 20-30k.

There was much talk then of "bridging the semantic gap" between high level
languages and the low level operations in hardware. It seems we have
subsequently bridged the semantic gap, by leaning to program in C...

- Brian



  parent reply	other threads:[~2010-08-14 10:47 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 20:21 Efficiency of code generated by Ada compilers Elias Salomão Helou Neto
2010-08-06 20:24 ` (see below)
2010-08-06 23:14 ` Shark8
2010-08-07  7:53 ` Dmitry A. Kazakov
2010-08-10 13:52   ` Elias Salomão Helou Neto
2010-08-10 14:24     ` Shark8
2010-08-10 14:28     ` Shark8
2010-08-10 15:01     ` Robert A Duff
2010-08-10 15:14       ` Yannick Duchêne (Hibou57)
2010-08-10 18:32         ` Robert A Duff
2010-08-10 15:10     ` Georg Bauhaus
2010-08-10 15:32     ` Dmitry A. Kazakov
2010-08-10 22:26     ` Randy Brukardt
2010-08-20  7:22       ` Yannick Duchêne (Hibou57)
2010-08-08 14:03 ` Gene
2010-08-08 15:49   ` Robert A Duff
2010-08-08 17:13     ` Charles H. Sampson
2010-08-08 18:11       ` Dmitry A. Kazakov
2010-08-08 20:51       ` Robert A Duff
2010-08-08 22:10         ` (see below)
2010-08-08 22:22           ` Robert A Duff
2010-08-09  4:46         ` Yannick Duchêne (Hibou57)
2010-08-09  5:52         ` J-P. Rosen
2010-08-09 13:28           ` Robert A Duff
2010-08-09 18:42             ` Jeffrey Carter
2010-08-09 19:05               ` Robert A Duff
2010-08-10 10:00                 ` Jacob Sparre Andersen
2010-08-10 12:39                   ` Robert A Duff
2010-08-09 19:33             ` Yannick Duchêne (Hibou57)
2010-08-09 21:42               ` Robert A Duff
2010-08-10 12:26         ` Phil Clayton
2010-08-10 12:57           ` Yannick Duchêne (Hibou57)
2010-08-10 14:03             ` Elias Salomão Helou Neto
2010-08-10 14:27               ` Yannick Duchêne (Hibou57)
2010-08-10 22:50                 ` anon
2010-08-10 23:28                   ` Yannick Duchêne (Hibou57)
2010-08-10 23:38                     ` Yannick Duchêne (Hibou57)
2010-08-11  7:06                       ` Niklas Holsti
2010-08-11 11:58                         ` anon
2010-08-11 12:37                           ` Georg Bauhaus
2010-08-11 13:13                         ` Robert A Duff
2010-08-11 23:49                           ` Randy Brukardt
2010-08-10 14:31               ` Shark8
2010-08-11  7:14               ` Charles H. Sampson
2010-08-11  6:42         ` Charles H. Sampson
2010-08-08 22:35     ` tmoran
2010-08-09 13:53       ` Robert A Duff
2010-08-09 17:59         ` tmoran
2010-08-09 19:36           ` Yannick Duchêne (Hibou57)
2010-08-09 21:38             ` Robert A Duff
2010-08-11  7:42       ` Charles H. Sampson
2010-08-11 13:38         ` Robert A Duff
2010-08-12  7:48           ` Charles H. Sampson
2010-08-12  8:08             ` Ludovic Brenta
2010-08-12 17:10               ` Charles H. Sampson
2010-08-12 18:06                 ` Jeffrey Carter
2010-08-11 18:49         ` Simon Wright
2010-08-12  7:54           ` Charles H. Sampson
2010-08-12  8:36             ` Dmitry A. Kazakov
2010-08-12 11:04             ` Brian Drummond
2010-08-12 19:23             ` Simon Wright
2010-08-12 20:21               ` (see below)
2010-08-13 15:08                 ` Elias Salomão Helou Neto
2010-08-13 15:10                   ` Elias Salomão Helou Neto
2010-08-13 18:01                     ` Georg Bauhaus
2010-08-13 19:52                       ` Robert A Duff
2010-08-14  9:44                         ` Georg Bauhaus
2010-08-13 20:22                     ` Robert A Duff
2010-08-14  1:34                       ` Randy Brukardt
2010-08-14  7:18                         ` anon
2010-08-13 21:57                     ` Jeffrey Carter
2010-08-13 22:37                       ` Yannick Duchêne (Hibou57)
2010-08-13 22:43                         ` Yannick Duchêne (Hibou57)
2010-08-13 23:29                         ` tmoran
2010-08-14  0:02                           ` Yannick Duchêne (Hibou57)
2010-08-14  0:16                             ` (see below)
2010-08-14 10:47                             ` Brian Drummond [this message]
2010-08-14 13:58                               ` Yannick Duchêne (Hibou57)
2010-08-15  0:23                                 ` Brian Drummond
2010-08-14 14:51                               ` (see below)
2010-08-15  0:58                                 ` Brian Drummond
2010-08-15  1:58                                   ` (see below)
2010-08-15 10:31                                     ` Brian Drummond
2010-08-13 15:37                   ` Dmitry A. Kazakov
2010-08-16 13:29                     ` Elias Salomão Helou Neto
2010-08-16 14:09                       ` Dmitry A. Kazakov
2010-08-18 14:00                         ` Elias Salomão Helou Neto
2010-08-18 16:38                           ` Dmitry A. Kazakov
2010-08-19 18:52                             ` Elias Salomão Helou Neto
2010-08-19 19:48                               ` Dmitry A. Kazakov
2010-08-13 16:58                   ` (see below)
2010-08-14 16:13                   ` Charles H. Sampson
2010-08-16 13:45                     ` Elias Salomão Helou Neto
2010-08-15 12:32 ` Florian Weimer
replies disabled

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