LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-20-2006, 01:28 AM   #1
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 33
Multiprogramming / Multitasking / Multiprocessing


Hi all,

I've been somewhat confused by what these terms actually refer to.
Okay, multiprocessing means concurrent execution of programs on a multiprocessor architecture. But what is the difference between multiprogramming and multitasking. I tried to read many articles, but couldn't get a clear picture. Here's a link to a wikipedia article that deals with the same.It says that multiprogramming is a subset of multitasking. Here's a snippet from the article:
Code:
Multiprogramming doesn't give any guarantee that a program will run in a timely manner. 
Indeed, the very first program may very well run for hours without needing access to a peripheral. 
As there were no users waiting at an interactive terminal, this was no problem: users handed a deck of punched cards to an operator, and came back a few hours later for printed results. 
Multiprogramming greatly reduced the waiting.


Cooperative multitasking/time-sharing

When computer usage evolved from batch mode to interactive mode, multiprogramming was no longer a suitable approach. 
Each user wanted to see his program running as if it was the only program in the computer. 
Time sharing had to be used.
For Multiprogramming it says:
Code:
Several different programs in batch were loaded in the computer memory, and the first one began to run. 
When the first program reached an instruction waiting for a peripheral, the context of this program was stored away, and the second program in memory was given a chance to run. 
The process continued until all programs finished running.
From this I get that multitasking is an improvement over multiprogramming. The article also says that the aim of multiprogramming is just to maximize CPU usage. So, in multiprogramming a program will continue to run as long as it does not block. However, if we add concepts like time-sharing, preemptive sheduling to multiprogramming we get multitasking.

Is my interpretation correct?
Thanks in anticipation.

Last edited by koodoo; 08-20-2006 at 01:32 AM.
 
Old 08-20-2006, 09:49 PM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Yes, you have it.
 
Old 08-23-2006, 03:49 PM   #3
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Original Poster
Rep: Reputation: 33
Thanks for the reply. Now I feel more confident.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a way to do multitasking in sh? pyenos Linux - Software 4 03-09-2005 11:27 AM
Recompiling for Symmetric Multiprocessing bmxcamel Linux - Hardware 4 04-10-2004 09:49 PM
multiprocessing in suse sxbah Linux - Hardware 3 03-28-2003 11:11 PM
Understanding Multiprocessing in Linux ruchi0801 Linux - Newbie 4 12-20-2002 02:18 PM
Multitasking hotrodowner Linux - Networking 1 07-25-2002 02:15 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration