Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesMultitasking and Multithreading


April 1996 / Reviews / Big Decision: Warp vs. Windows / Multitasking and Multithreading

The most significant job an OS does is to manage memory efficiently and control how applications use system resources. An OS that does memory management and task scheduling permits both context switching and multitasking. Context switching suspends activity when one operation is pushed to the background and another is brought to the foreground; only the application in the foreground window remains active. Context switching is sufficient for many work environments and provides dramatic productivity gains over the exiting and loading of different applications in single-tasking environments.

Multitasking , on the other hand, runs multiple operations concurrently. It makes sense mainly in multiuser environments. Its benefits become really noticeable with long and comple x tasks, such as heavy database queries, program compilation, and complex graphics processing.

Even though all three OSes use preemptive multitasking for 32-bit applications, only OS/2 Warp and Windows NT Workstation use it for older, 16-bit applications. Windows 95 uses cooperative multitasking for 16-bit DOS and Windows applications.

For preemptive multitasking to operate effectively requires a task-scheduling scheme, where the scheduler selectively dispatches and suspends multiple concurrent tasks. Cooperative multitasking relies on applications to relinquish control of the processor so that other applications get a turn. This means the applications are in control, not the OS.

The multithreading capability of today's 32-bit OSes provides more power than simple multitasking does. The OS can execute multiple tasks simultaneously, and it can run multiple processes concurrently. The kernel breaks down tasks into singular processes and runs each process as a single thread. Interprocess communications (IPC) allows the different threads to talk with each other by passing data back and forth.

The real advantage of multithreading is that it makes it much easier to do multitasking. Multithreading allows programs to multitask within themselves. Applications that can benefit considerably from multithreading include background pagination and formatting, spell-checking, complex database searches, document control, and dual-channel communications.


Tasks vs. Threads

illustration_link (3 Kbytes)


Up to the Reviews section contentsGo to previous article: Multitasking and MultithreadingSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network