difference between task and process

Hi,

what is the difference between a task and a process.

what is the difference between multitasking , multiprogrammnig and multiprocessing?

Thanks in advance

"Task" and "multitasking" are terms that do not have universal definitions in the world of unix.

"Multiprogramming" means the ability to run several programs at once. We take this for granted today, but early systems could run one program at a time. Almost all computer systems today use multiprogramming, so's there's really no need for the term anymore.

"Multiprocessing" is the ability to have several cpu's in one system to distribute the load. The are still penty of uniprocessor systems out there, so this term still sees frequent use.

You didn't ask, but "multithreading" is the ability to have multiple threads in a process. For example, one thread may be reading the next block of data while another thread processes the current block of data. When I heard "multitasking" used in the non-unix world, it was referring to something close to today's multithreading.

perderabo
Can I have some more on "Multithreading"?
:slight_smile:

See "man pthread_create" as a starting point. There is an example on that page. There are also a lot of man pages on threads. Use "man -k pthread" to get a list.

The defination I use for multiprocessing is more similar to number (1) in the link below:

http://www.webopedia.com/TERM/M/multiprocessing.html

Multiprocessing has two meanings, like terms in Websters. I tend to use the term for (1) in the link above and not (2). For (2) I tend to use the term 'multiprocessor'....... confused :confused:

Here is another link:

I have gone deep into my archives to further research this question. The earliest book that I could find that uses all three terms is Operating Systems by Harry Katzan Jr published in (I'm dating myself here) 1973. The book heavily focuses on IBM operating systems since IBM dominated the market in those days.

First, the word "process" does not even get an entry in the index. Where we would use "process", this book uses "task".

In Chapter 5 Evolutionary Development of Operating System Technology, we learn that IBM first broke the "one program at a time" mold when it introduced SPOOL. You will love this quote...

But anyway Spooling was the first example of multiprogramming. The computer could run one user written task and it did something else. But the "else" was limited to spooling and few other os supplied utility programs.

Multitasking was the next step where the OS could actually run two or more user written tasks at once.

And multiprocessing is indeed two or more cpu's in one system. I too used to use multiprocessing to mean multiple processes, but I stopped when real multi-processors came along. It's kinda like the way the terms "microcode" and "firmware" got carelessly used.

Excellent point Perderabo.... thanks for the extra research! Here is a Linux link that basically says the same thing as you are saying:

http://www.linuxguruz.org/foldoc/foldoc.php?multiprocessing

And another one:

Thanks for the clarification!!