Reply to post: Re: True multitasking didn't exist ...

That code that could never run? Well, guess what. Now Windows thinks it's Batman

Anonymous Coward
Anonymous Coward

Re: True multitasking didn't exist ...

"It had been heavily tested on VMs but fell down like a sack of s**t when deployed live."

I figured out a programming error that way once (ok the other way around). It worked in the virtual machine emulation every time. It was slow but it would have provided a way to look at things after the failure. But it never failed.

Running it live it would sometimes work, and sometimes fail with corrupted data. Oh, and only one input file failed that way. Other input files worked fine.

Finally after several days of trying to figure it out. The possible (and true) cause came to me as I was drifting off to sleep. The code used triple read buffers. I got up and wrote a note to myself so I wouldn't forget by morning.

Turned out the bad file had the EOF mark long before the last allocated sector of the file. Lots of extra sectors. When it failed, the read file routine would see the EOF and free the buffers.

But this was on a mainframe (up to 4 processors and 4 IO processors), and the disk reads were cued up to IO processors that handled the actual disk reads. So in the live runs, sometimes there would be outstanding disk reads waiting to write to the disk buffers that had just been freed. Or maybe the disk reads happened before the memory was reused. But in the virtual machine emulation it always did it the same way which however it was, always worked.

FWIW, this mainframe (Sperry Univac 1100/80) had at least one atomic instruction. I think it was read modify write but that was long ago and I wasn't having any luck Googling it.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon