Welcome, Guest. Please login or register.

Author Topic: How an infinite number of deceased cattle vastly improved the Amiga  (Read 1864 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline pkivolowitzTopic starter

Last story for a bit. Not at all ASDG related :)

The Amiga OS, especially towards the end of Commodore, was probably the most bug-free non-trivial OS ever - or for at least a very long time. Even without an MMU to keep tasks penned in their own virtual address space, Amigas could remain up and running for months on end.

Any error in any program or in the OS could instantly bring down the entire machine. Yet, the machine was incredibly reliable (with a large body of 3rd party software running too).

What made this possible way back when? Many things, not the least of which was a shared ethic held by Commodore on down through the developer community of taking bugs and bug hunting seriously. Many later platforms dismissed fixing old features in favor of adding new features because new features are what sold systems. The Amiga was proof that a developer and OS provider could innovate like mad and STILL be committed to quality.

One of the tools we used depended on an infinite number of deceased cows. The tool was called Enforcer, written by Bryce Nesbitt.

The tool was very effective at finding two extremely common bug types. Array overruns and dangling pointers. This is where the cows come in.

The 68K could not use an odd number as an address of data or instruction. Encountering an odd numbered address was an instant Guru Meditation.

Unallocated memory was filled with the value 0xDEADBEEF (notice the last F - it is 15 - odd). If you had a bogus pointer and it landed in unallocated space you would instantly crash. A good reliable crash is a debugger's best friend. Pointers could be bogus because they contain garbage or they refer to memory which used to be allocated but was freed (and you're still wrongly hanging on to the pointer).

Similarly, DEADBEEF would be placed around blocks of allocated memory. When the memory was freed if DEADBEEF wasn't found before or after the block you would know you overran the buffer (or somebody else clobbered your memory which was much much worse).

A large part of the developer community and I believe most of the folks inside Commodore ran Enforcer all the time - in this way we bug checked each others code even as we developed our own code. THIS is why the Amiga was so reliable - community based bug hunting. Sure the community basis was sort of necessary (because of the lack of memory isolation) but it was also ingrained in the Amiga culture of sharing.
« Last Edit: March 16, 2010, 04:25:25 AM by pkivolowitz »
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: How an infinite number of deceased cattle vastly improved the Amiga
« Reply #1 on: March 16, 2010, 04:38:00 AM »
What a heartwarming story :)

For anyone interested, the modern Enforcer is called MuGuardianAngel and it is awesome.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline koaftder

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 2116
    • Show only replies by koaftder
    • http://koft.net
Re: How an infinite number of deceased cattle vastly improved the Amiga
« Reply #2 on: March 16, 2010, 04:46:00 AM »
I love hearing about this kind of stuff.
 

Offline stefcep2

  • Hero Member
  • *****
  • Join Date: Sep 2007
  • Posts: 1467
    • Show only replies by stefcep2
Re: How an infinite number of deceased cattle vastly improved the Amiga
« Reply #3 on: March 16, 2010, 06:55:00 AM »
Many people-on this board included- have been highly critical of the Amiga's lack of memory protection, and how a single program could bring down the entire system.  You know the whole "you'll lose data if it crashes" thing.  Well I've kept telling them, yes thats true, but no it didn't happen anywhere near as much as you think it did.  This goes some way towards explaining why my A4000 68060 with CV 64 would run for weeks without a reboot.
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: How an infinite number of deceased cattle vastly improved the Amiga
« Reply #4 on: March 16, 2010, 07:38:08 AM »
I use DEADBEEF as a routing segments for linking two (or more) IPX segments over WAN - some are still in operation. Have to admit though that I didn't remember where it was coming from... :D
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: How an infinite number of deceased cattle vastly improved the Amiga
« Reply #5 on: March 16, 2010, 07:46:24 AM »
I've used 0xDEADBEEF as a "magic" number for various purposes in many bits of code :)

With the advent of the 68020 though, I can see it would be more difficult to trap data accesses since the 020+ allows misaligned access to data.
int p; // A
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: How an infinite number of deceased cattle vastly improved the Amiga
« Reply #6 on: March 16, 2010, 08:05:08 AM »
Quote from: pkivolowitz;547780
The 68K could not use an odd number as an address of data or instruction. Encountering an odd numbered address was an instant Guru Meditation.

For data 68000 and 68010 only. 68020 and up handle odd pointers just fine (albeit a bit slowly). Obviously branch (jsr, jmp, rts, rte and so on) to odd pointers would crash as usual.

While Enforcer is quite nice I would give my left kidney for valgrind.
 

Offline kolla

Re: How an infinite number of deceased cattle vastly improved the Amiga
« Reply #7 on: March 16, 2010, 09:30:50 AM »
Quote from: Piru;547796
I would give my left kidney for valgrind.
Is that a bounty request? :laughing:
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS