Professional Documents
Culture Documents
1
Algol60 Implementation Significant failure: Mark II
n Designed and documented in Algol60 n Hoare got promoted, and Elliot started building Mark II
n Assembler
n Then coded in machine language by hand! n Automatic code and data overlays from backing core, tape
n Using explicit stack for recursion n Automatic input/output buffering
n Filing system on tape
n Started with a small subset n New implementation of Algol60, Fortran compiler
n Was able to add more features
n Designed system, deadline in 18 months (march 1965)
n Delivered the compiler in middle of 1963 n Revised to June, later revised by another 3 months
n Very few complaints! Satisfied customers n Started digging into the details:
n Limited resource of memory wasn’t handled either by the
n Awarded with membership in the Algol language working committee assembler or the automatic overlay scheme
n Proposed two changes: relax compulsory declarations, case statement n System was occupying most of the memory resource!
instead of a generalized switch statement based on “goto” n Hardware address prevented adding more memory
n Simplicity: zero sum game; complexity costs something n Arguments to system call are passed by reference
n Design the core to be fast, flexible primitives n CONNECT: system call to obtain access to directory (takes a
n Separate normal and special cases (example: garbage collection) n This system can be cracked!
n Procedure arguments (protocol); leave it to the client n Have password span page boundary
n Example: Spy system monitor, monitor synchronization n See whether you get a page fault early or late
2
Abstraction Hides Hints on Speed
n Consider a record with lots of fields n Static vs. dynamic
n Exports a FindIthField function n Caching
n Involves a linear scan n Hints:
n Implement FindNamedField using this function n May be accurate, but can check its accuracy
n One possible implementation: n And can recover from inaccuracy
For I=0 to N n Pay attention to constant factors
if (FindIthField(I).name == inputname)
n Do things in the background
break;
n Throughput-centric vs. latency centric view
n Built a O(N^2) algorithm! n Shed load
3
Alan Turing (contd.)
n The English report says: "I can forgive his writing, though it is the
worst I have ever seen, and I try to view tolerantly his unswerving
inexactitude and slipshod, dirty, work, inconsistent though such
inexactitude is in a utilitarian; but I cannot forgive the stupidity of his
attitude towards sane discussion on the New Testament." Bottom of
the class.
n He did better in Latin, only second from bottom: "He ought not to be in
this form of course as far as form subjects go. He is ludicrously
behind".
n The maths and science reports were better but still complained: 'His
work is dirty'. He was nearly stopped from taking the School Certificate
(as became O-levels, later GCSE.)