Quote:
Originally posted by JMS
kaftab,
Although the consensus is that the idea of putting a program into a tight loop to simulate a wait state is a bad idea, It's certainly inventive. My own reaction to this idea was so strong cause I've actually seen this technique before. I was working on the small parcel sorting system down in Memphis Tenn, at Fedex. This server code was collecting billing files and inserting them into a database collected from about 40 sco unix boxes which ran this huge Crisplant sorting system for flat packages.
All visiblilty into the sort came from these files as well as the financial data. Anyway the machine they had was pretty beefy for the day. Quad processor should have been more than enough for the task. Running the sorters at about 25% capacity this machine was topped out. They upgraded to more expensive boxes ( server was redundant ) and still didn't work. Dude who wrote the program employed what he described as "virtual semephores". What is a virtual semephore you ask, it's an integer in a tight loop.
Anyway the program worked and that's saying something. But replacing the "virtual semephores" with just plain old semephores allowed us to run on the original boxes and not saturate the cpu's.
Just a story to explain my reaction, didn't mean to come down on you hard....
Didn't FedEx ever hear of a piece of software called a "code profiler"? :)