• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

multithreading,tasking

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the difference among MultiThreading,MultiProcessing,MultiTasking?
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic