comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: hashing
Date: 5 May 2002 06:55:01 -0700
Date: 2002-05-05T13:55:01+00:00	[thread overview]
Message-ID: <5ee5b646.0205050555.600470b3@posting.google.com> (raw)
In-Reply-To: 1b2t8.507$na.19833@news8-gui.server.ntli.net

"chris.danx" <chris.danx@ntlworld.com> wrote in message news:<1b2t8.507$na.19833@news8-gui.server.ntli.net>...
> p.s. does anyone have any uses for circular lists?  Tom 
> Swans Tp5.5 book mentions them, what are they used for?  > Just curious...

Lots and lots of good uses for circular lists. I regard
them as one of the fundamental data strucures for queues.


Consider the following. Implement a circular list where
the tail of the list points to the head (singly linked).

Now point the head pointer to the LAST item on the list,
not the FIRST. That way, since the LAST is linked to the
FIRST you have immediate access to both and it is easy
to remove the head or add to the tail, without needing
double links, or a separate pointer to the head and tail.

There are many uses, but in the operating systems I wrote
for Honeywell, all queues were represented this way (space
was very important in those systems which were for machines
that by todays standards had small memories -- the large
members of the family had 32K bytes of memory, and these
were full featured real time executives and time sharing
operating systems :-)



  parent reply	other threads:[~2002-05-05 13:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-10 21:31 hashing chris.danx
2002-04-10 21:24 ` hashing Steven Deller
2002-04-10 22:41   ` hashing Nick Williams
2002-04-10 23:36   ` hashing chris.danx
2002-04-11 14:18     ` hashing joevl
2002-04-15 15:32     ` hashing Ken Burtch
2002-04-11 23:18   ` hashing(HATs. A more efficient algorithm?) Wannabe h4x0r
2002-04-11 23:29     ` chris.danx
2002-04-12  7:24       ` Wannabe h4x0r
2002-04-12 15:00         ` Chad R. Meiners
2002-04-12 17:22         ` tmoran
2002-04-10 21:56 ` hashing Chad R. Meiners
2002-04-10 23:43 ` hashing Ted Dennison
2002-04-11 16:12 ` hashing Georg Bauhaus
2002-04-11 22:36 ` hashing Simon Wright
2002-05-03 10:16 ` hashing Antonio Duran
2002-05-05 13:55 ` Robert Dewar [this message]
2002-05-06 20:42 ` hashing Antonio Duran
2002-05-06 23:36   ` hashing Jeffrey Carter
  -- strict thread matches above, loose matches on Subject: below --
2002-04-10 22:00 hashing Beard, Frank [Contractor]
replies disabled

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