|
|
||
|
||
[an error occurred while processing this directive]
David Puett
2001.04.18
I just finished reading BeOS or NeXT: Did Apple Make the Wrong Choice? While it is a well written article, some points are explained poorly and some are just plain wrong. I am writing this note to you in hope that you will publish it and correct some of the points that Mr. Ploudre made.
Multitasking is the ability to run more than one program at the exact same time. While this is impossible on a single processor system, it is possible on a multiprocessor system. On a single processor system, the CPU must quickly switch between programs to give the illusion that it is running more than one program at the same time.
This leads us to the two major types of multitasking: cooperative and preemptive. Mac OS 8 and Windows 3.1/95/98/Me use cooperative multitasking (Windows 3.1/95/98/Me use preemptive multiprocessing to switch between DOS sessions, but we will ignore that for now). Mac OS X and Windows NT/2000 use preemptive multitasking. Preemptive multitasking is better in most circumstances, but let's look at both.
Imagine that your computer is a kitchen. Instead of programs, you have three appliances: a blender, a clock, and a lamp. You are the CPU, and you have a single power cord that you have to switch between all of the appliances. Now this is part is tricky, each of the appliances has a "locking" power plug. In other words, when you plug the power into the appliance, the appliance "holds" onto the cord until it releases the cord, then you can move the cord to another appliance.
Everything is working well in your kitchen, and all three appliances are working in perfect harmony. Then you decide to add a stereo. You add the stereo, and there are problems. The clock starts showing the wrong time, and the lamp is flickering. Remember when I wrote about each appliance "'holding" on the cord until it lets go? Well, that is the problem with cooperative multitasking. The CPU can not move to the next process until the current process releases control. While this is nice for an application that sometimes needs a little extra CPU time, a poorly written application can hog the CPU and basically starve all of the other applications.
Preemptive multitasking works a bit differently. Imagine instead of plugging the power cord directly into the appliance, each appliance has an extension cord attached that runs to you. So instead of plugging directly into each appliance, you plug into the appliance's extension cord. So now you don't need to wait until the appliance releases the cord, you can switch cords whenever you like. That is preemptive multitasking. The CPU switches between the applications when it wants and each application thinks that it has full control of the CPU. With preemptive multitasking no one application can hog the entire system.
If multitasking is running multiple applications at the same time, multithreading is running multiple parts of an application at the same time. An example would be a word processor. Remember when you had to type the document and then run the spellchecker? And remember how you had to wait for it to send your document to the printer? With multithreading, the spellchecker can run at the same time as you type. That way you see all of those little red lines immediately. And you can start typing immediately after you tell the file to print. When you tell the program to print the file, it spawns the process (creates a new process and executes it), and the CPU can send that process to the background so you can keep typing.
A journaling file system is always a good thing. However, a journaling file system will not prevent file system corruption, nor does it add any extra security. A journaling system will corrupt as easily as any other file system if a power outage occurs in the midst of a disk write. The benefit is on the restart.
A journaling file system keeps a log of all the file system writes. On a non-journaling file system, a disk repair program must check the entire file system for errors. On today's large hard drives this can take some time.
On a journaling file system, the disk repair program, which must still be executed, can read the journal entries of all of the open files. This way, the entire disk need not be scanned, only the previously open files.
Disk fragmentation will always occur. Here is a visual example of fragmentation. For simplicity sake, each file is represented by a number and each character equals one meg.
You have a clean disk and you save a 10 meg file. Your disk looks like this.
You then save a 5 meg file.
You then save a 3 meg file.
You then add 2 megs to the '2' file.
You add 1 meg to the '1' file.
You delete the '2' file. See the 'open' spaces between the files?
You save a 4 meg file.
You save a 6 meg file.
You add 2 more megs to the '1' file.
As you can see, the file system has become fragmented. Fragmented just means that all of the files are not contiguous. You notice how the '5' file is located in three different parts of the disk. Rather than the hard drive reading the file at one time, it has to read parts of it from three different areas. This takes time. And when a file is scattered in thousands of places across a hard drive, you can understand how this can really slow down a system. BTW, if we ran a disk defragmenter on the above hard drive the result might look like this.
I can speak well of Be. I was one that looked anxiously for the Be beta that was distributed with Mac Tech magazine. I was an original beta1 and beta2 tester. I bought the first release when it was available on the Intel platform. I was amazed at the spinning teapot demo. And that was the problem.
That is all the OS could do. It could spin a teapot and play several movies without dropping frames. A nice technological demo, but hardly a career choice. In other words, there were (and are) no apps for the wonderful little OS. Sure, Be designed it on a clean sheet of paper - the same paper they could use to list every application ever written for Be and still have room to doodle.
When Apple decided to go with NeXT over Be, Be couldn't even print. Be, while blazingly fast, was blazing fast for a reason. Nothing was running on it. Apple chose to go with the OS that was stable, proven, and gorgeous. Apple also got NeXT's unbelievably fast development environment, the leading application server software WebObjects, and the Mac's father and Apple's savior, Steve Jobs. (Personal note: I still remember leaving work late for Christmas vacation ecstatic after reading that Steve Jobs was back at Apple.)
Speaking of NeXT's fast development environment, Steve Jobs used to demo it in a unique way. When Steve was giving a demo or seminar of NeXT, he would have a programmer onstage with him. The programmer would start writing an application at the start of the seminar. Steve would close the seminar by demonstrating the app that had just been written!
As for Apple choosing NeXT or Be, I think the choice was quite clear. So the next time you think that Mac OS X or OS 9 is holding your system back, you should thank Apple. Thank Apple that there are device drivers for hardware, extensions, and thousands of applications that "slow down" that wonderful computer with its gorgeous and elegant GUI.
Share your perspective on the Mac by emailing with "My Turn" as your subject.
Memory To Go Special: MacPro 8 Core 8GB kit $232 / 4GB kit $116 / 2GB kit $72. New Macbook 2GB DDR3-$65. HARD DRIVES available -- Free shipping / LIfetime warranty.
Download Typestyler, still the Ultimate Styling Tool for Internet, Print and Video Graphics. Works great in Classic with a Native OS X Version on the way. Free Tryout: www.typestyler.com
LA Computer Company: Specials on AppleCare, iMac's, Apple Batteries and Apple A/C Adapters. Also Great prices on Used Apple Computers. Call 1-800-941-7654 Click Here.
Mac users can finally play Party Poker for Mac. Not only that, they can also learn how to play PokerStars for Mac.
Laptop Hardware Provided by TechRestore - Overnight Mac & iPod Repairs.
Compare products like desktop computers, laptops, and LCD TVs side by side! All the information and reviews to make the best purchasing decision for a new cell phone GPS products or MP3 players. The Ciao network makes searching products easy for you.
Entire Low End Mac site copyright ©1997-2008 by Cobweb Publishing, Inc., unless otherwise noted. All rights reserved. Advice presented in good faith, but what works for one may not work for all. Please report errors to the webmaster.
LINKS: We allow and encourage links to any public page as long as the linked page does not appear within a frame that prevents bookmarking it.
Access our RSS news feed at http://lowendmac.com/feed.xml.
Email may be published at our discretion; email addresses will not be published without permission. If you prefer your message not be published, mark it "not for publication." Letters may be edited for length, context, and to match house style.
PRIVACY: We don't collect personal information unless you explicitly provide it. For more details, see our Terms of Use.
Low End Mac is an independent publication and has not been authorized, sponsored, or otherwise approved by Apple Computer. Apple, the Apple logo, Macintosh, iBook, iMac, eMac, iPod, and PowerBook are registered trademarks of Apple Computer, Inc. Additional company and product names may be trademarks or registered trademarks and are hereby acknowledged.