Multitasking, Part 1

Back around 1987 I picked up a Commodore Amiga 1000. This was an interesting little box for home computers of the day. In the late eighties the typical home/office PC was running MS-DOS and had a whopping 640k bytes of memory. The Amiga didn't look like the average home computer and it certainly didn't behave like one. For starters, it had a graphical user interface (popularized by the Mac a year or two earlier) and a two button mouse. Unlike the average Mac, it was color (4096 color palette). Further, it had a choice of screen resolutions including 640x400 interlaced. While those numbers might seem comical today, twenty years ago it was something to behold.

Also like the Mac, the Amiga used the Motorola 68000 series microprocessor. But unlike virtually every home computer at that time, the Amiga offered a true preemptive multitasking operating system. Now I've done a fair amount of programming over the years, everything from PDP-11s and VAX 11-785s through microcontrollers, and I value a good, flexible operating system. Having true multitasking at home was too much to resist so I bought one. I soon discovered some neat things about the Amiga. For starters, it had "32 bit clean" addressing. That meant I could add a bunch of RAM to it, way beyond what my friends were stuck with on their DOS boxes. In short order I had 2.5 Meg of RAM, an absolutely crazy amount for that time, and more than we had in our VAX at work. As I recall, it set me back around $500 for the two Meg expansion unit (a metal box a couple inches wide, and perhaps 10 inches square, containing two PC boards each populated with one Meg of RAM). With deep enough pockets, I could add 10 or 20 or more Meg of RAM if I wanted to (in fact, a fellow engineer who used finite element analysis for his antenna designs eventually had a 64 Meg Amiga). The closest thing to this was the Mac, but at the time most of the Mac world was using 24 bit addressing (using the top byte of pointers for other purposes).

But the multitasking, that was beautiful! It was part of the executive. No programming tricks were required. Some competitors came up with so-called "cooperative multitasking" or task switching, but these were short-term hacks at best. No, Amigans would have none of that. I could launch a program to perform some work in the background, go about my other duties, and eventually, check back for my results. I say "eventually", because a 68000 microprocessor running at 7.2 MHz is not a barn-burner. But it did work. You could run several programs at the same time and everything behaved reasonably well.

"Reasonably well". There it is again, a qualifier. The obvious question for a 21st century programming is "How do you shoehorn a fully multitasking operating system into 256 k bytes of memory?" Well, you don't do it by throwing in everything including the kitchen sink. As a matter fact, you keep the plumbing as simple as possible. I am still amazed at what the designers were able to do with that platform, but some of it is almost scary by today's standards. For example, while the executive took care of task scheduling and switching and so forth, the system was not memory protected. That is, it was entirely possible for program A to access the memory of program B and vice versa. This is called playing fast and loose: you remove some overhead but remove safety as well. As long as a program didn't do evil things like chase null pointers (and some did), everything worked great. In fact, for certain sorts of chores, being able to access any and all memory was downright convenient (if impolite). Eventually, Amigas used more powerful microprocessors as they became available, such as the 68020, 68030, and 68040, along with the 68881 and 68882 math coprocessors, and the operating system began to exploit memory management units to make things safer. In fact, by the early 1990's, I was running a modified Amiga 2000 with virtual memory so that I could edit large sound files of several Megabytes. By then, the Intuition user interface had evolved into a nice embossed 3D look with a variety of nice features. The Amiga had grown in other ways, including an intelligent expansion card system that really was "plug and play".

Ahh, but still it was the multitasking: The ability to do several things at once. That was the ticket. And an interesting thing happened. For years I had to explain the concept of multitasking to friends. Then by the mid-nineties, the term seemed to enter then general lexicon, first with the introduction of Windows 95, and later in non-technical areas.




(A couple of side notes: Commodore Business Machines, makers of the Amiga and its wildly popular predecessor the Commodore 64, eventually went bankrupt, and while the Amiga name was bought by a series of other companies such as Escom and Gateway, it eventually faded away from the home computer market. Several third party companies still pushed the frontiers, but without major investments for core improvements and enhancements by the new owners, the stage was set. It lives on with Amiga, Inc. As the Mac had made inroads into graphics and publishing, the Amiga had made inroads into video, primarily because it was NTSC-friendly. In fact, Amigas were commonly used for small scale video production such those at a local cable franchise. Some are still out there, working away. Indeed, it was only a few months ago that I flipped through the TV channels and saw an AmigaDOS 3.0 screen where the usual public service announcements should be. Apparently, someone had not inserted the proper disk and whatever program they were running had halted.

Regarding the laughably small memory footprint by today's PC standards, it should be noted that even one Megabyte of memory is a tremendous amount of memory for many of today's embedded applications. A typical afternoon for me might involve using a desktop PC with say, 512 Meg of RAM, to edit code for a PIC microcontroller that might have 200 bytes of free memory. That's bytes, not Megabytes, and that's what I call "memory constrained".)

More like this

Over at Page 3.14, there’s a post where us old farts reminisce about computing when we were young ’uns. I’m quoted as saying "My first computer was a ZX81 (Timex/Sinclair here in the US). Had 1k of memory. Taught myself assembly. In high school and college, virtually everything was hand written.…
I was born in 1984. My earliest memory of a computer is thumbing through a plastic box of black, square 5.25-inch floppy disks, trying to decide whether I wanted to play The Oregon Trail, Mavis Beacon Teaches Typing, or Word Munchers on the family Compaq 386. Since most of the ScienceBloggers…
I picked up a little buzz about Google software engineers planning to rework the guts of some major open-source software to make it run faster. Since it wasn't software I use, I didn't read enough to remember what software, but it brought up memories... Walking to school in the snow, 3 miles,…
This is one of four related posts: Should You Install Ubuntu Linux? Installing Ubuntu 16.04 LTS How to use Ubuntu Unity Things To Do After Installing Ubuntu 16.04 LTS Some Linux/Ubuntu related books: Ubuntu Unleashed 2016 Edition: Covering 15.10 and 16.04 (11th Edition) Ubuntu 16.04 LTS Desktop:…

24 bit addresses can address 16M, and that was the ram limit on the higher-end macs at the time the early Amigas became available. So the Amiga's 32 bit addressing was an advantage for your friend with 64M, but not for you with 2.5M .
In any case, though Macs didn't have pre-emptive multitasking for a looong time (not til netbsd was ported to mac ...), Macs with 68020s (capable of 32 bit physical & loogical addressing) shipped with 32-bit addressing OSes only few years after the Amigas did.

In 1980 I paid $200 for a Timex/Sinclair 1000. Standard on board memory: 1k.
Screen resolution was 32 x 24 (?) on a BW TV.

But when I got that big fat pixel to bounce in a 1G field . . . Oh,boy! Here we go!

By Crudely Wrott (not verified) on 14 May 2007 #permalink

llewelly, I knew that I was not using a 32 bit pointer to its max, but it was good to know that people didn't write code that effectively used a 24 bit pointer for future's sake. Let's just say that I dreamed of having pockets deep enough to take advantage of it and not have to worry about the SW croaking.

After the A1000 I graduated to a 68030 Amiga. In fact, it is still on a shelf in my basement. It has a whopping 40 MEG SCSI hard drive. Maybe it was 80. I forget. To put this in perspective I also have a 10 Megapixel digital camera. Think how many pics I could store on that baby!

I'm always up for a bit of techno-nostalgia and enjoyed your Amiga reminiscences. It was very much 'ahead of it's time'. I can remember the sorry excuse for multitasking in Windows 3.11, it was pretty laughable. It's amazing how Microsoft rose to it's position of dominance considering how sub-par technically they've pretty much always been. Hopefully the kids out there aren't wasting too much of their time on the Visual Studio Express.