File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes multithreading,tasking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "multithreading,tasking" Watch "multithreading,tasking" New topic


eswar kumar
Ranch Hand

Joined: Oct 20, 2002
Posts: 98
what is the difference among MultiThreading,MultiProcessing,MultiTasking?
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Multiprocessing means that there are more than one process (program or executeable) running in the OS and if in terms of programming, then some interprocess communication or cooperation is taking place.
Multitasking and Multiprocessing mean essentially the same thing. Multitasking is when several processes share the same CPU by each taking a slice of time either pre-emptively (the OS decides) or cooperatively (the process decides).
Multithreading means that a single process (program) has more than one thread of execution.
In both schemes it is important to protect data from corruption by concurrent access from different threads/processes. In a Java multithreaded application we protect the data by using the synchronized key word or an object monitor. For multiprocess applications it is necessary to use kernel level objects like semaphores and mutexes to keep the data protected.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Igor Ko
Ranch Hand

Joined: Jun 24, 2002
Posts: 90
Yes,and each task/process works in its own memory space, and
can't access to other process memory space. (really if you have
enough privilege, and works in corresponding OS you can do it,
using some very special system calls).
Thread works in the same address (memory) space as other threads
in the same application/process/task. So it can change the memory
for other threads. And because processor shouldn't switch memory
context, the switching from thread to thread is faster, than
process to process.
[ December 22, 2003: Message edited by: Igor Ko ]
I agree. Here's the link:
subject: multithreading,tasking
It's not a secret anymore!