Paul Rubin <no.e...@nospam.invalid> writes:
> Alan Bawden <
al...@scooby-doo.csail.mit.edu> writes:
>> In PDP-10 MacLisp, where addresses are 18-bits wide, the top 9 bits were
>> used as an index into a "segment table" that described the type of
>> objects in that 512-word "segment".
>
> Thanks, Alan. That is the info I was looking for but couldn't find in
> the Maclisp manual. A few followup questions if it's ok:
>
> 1) Where were the GC mark bits kept, e.g. for conses?
For conses (and some other types) the garbage collector allocated blocks
of GC bits for every segment of conses. Some other types of objects had
room to spare where a GC bit could be stashed.
>
> 2) Did the GC compact stuff in memory? Did it need much extra memory
> for bookkeeping to do that? I'm presuming it was a mark-sweep collector
> since I think I heard that somewhere.
No compaction was done.
You can read all about this yourself by reading Steele's memo directly:
ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-420.pdf
(And anyone interested in the history of MacLisp should also read:
ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-421.pdf
Which is about arithmetic in MacLisp.)
> 3) How much memory did it take to run a reasonable Maclisp program
> (i.e. in the 1 KLOC range with a kword or two of live user data, not
> something like Macsyma)?
This kind of question is very hard to answer 39 years later. At the
time we would write pretty much anything sufficiently complicated in
MacLisp. It was the high level language of choice. And it's hard to
believe, but we really didn't worry too much about running out of
address space. At the time, 262144 36-bit words seemed huge. Half a
MILLION cons cells! Sure, we knew that really serious programs like
Macsyma were running out of memory all the time (read Steele's memo!),
but for writing most ordinary programs it wasn't much of a concern.
You have to realize that these machines were also amazingly slow by
todays's standards, so it actually took a lot of time to fill up that
amount of memory. And also these machines didn't have that much physical
memory, so if you had a process using an entire address space, and there
were other people trying to do other things on the machine at the same
time (this was timesharing after all), you were probably making the
machine thrash. (And soon an angry professor would appear in your door
wondering what the *BLEEP* you were doing!)
So other things discouraged you from using that much memory before you
actually ran out of address space.
> If you were on a small PDP-10 and wanted to whip out a utility to
> (say) reformat a text file, would you have used Maclisp the way people
> use scripting languages now?
Definitely. (Of course on the PDP-10 we also wrote a lot of stuff in
assembler -- not always for efficiency's sake, but just because PDP-10
assembler was such fun to program in!)
> Did programs of that era tend to use data mutation (setq,
> rplaca/rplacd) a lot to avoid consing, as opposed to later styles that
> relied on GC more?
Yes, we did some really really ugly things with RPLACA and RPLACD.
Whole data structures that were implemented out of nothing but cons
cells linked together in insane ways. The Lisp world is a better place
now that those days are behind us.
> (Hmm, now that I think of it, SNOBOL existed back then, but I don't
> know how many people used it).
I'm not sure I understand how SNOBOL got in here...
--
Alan Bawden