2
$\begingroup$

I was a little confused between these three terms Multitasking, Multithreading and Multiprogramming

Although every one means executing different lines of codes, and for every one we need something like Task State Segment or context to store data for that particular thread/task.

I am missing something, can anyone give me the basic difference between them and how they are actually executed in a processor

Edit: Actually I was a guy from Electronics background and I was poor at OS related issues. The main thing I understood between multiprogramming and multithreading is that in multiprogramming we execute two separate programs where as in multithreading the scheduler produces two different threads which can be executed independently. I think these are a form of multitasking implementation. Am I correct. I was really confused

$\endgroup$
  • $\begingroup$ What research have you done? Have you read the articles on Wikipedia for each of those? Have you taken a stroll down to your nearby library and read an operating system textbook's description of those textbooks? I encourage you to edit the question to show what research you've done on your own before asking. $\endgroup$ – D.W. Dec 8 '13 at 4:38
1
$\begingroup$

The Wikipedia article Computer multitasking covers this well. In summary:

  • Multitasking: there is more than one process and the operating system somehow decides which to run next.
  • Multithreading: threads are essentially subprocesses, which share memory (separate processes cannot normally access each other's memory) but which are independently scheduled.
  • Multiprogramming: a form of multitasking in which a process keeps running until it tries to access an I/O device, at which point another process is chosen to run so the CPU doesn't idle waiting for a punched card reader or something.
$\endgroup$
  • 3
    $\begingroup$ Confer Multiprocessing: The simultaneous execution of two or more sequences of instructions by multiple CPUs under common control. (Webster's New World, Dictionary of Computer Terms, 3rd ed., 1988) $\endgroup$ – Dan D. Dec 8 '13 at 10:22
-1
$\begingroup$

Multitasking is a user-interface term; it means the computer system allowed the user to do multiple tasks at once. Multitasking has nothing to say about how it's actually implemented; it can even be implemented as a single threaded program.

Multithreading and multiprogramming are forms of the processor being able to execute multiple tasks at once. The difference between multithreading and multiprogramming is the level of isolation between threads and program; each threads in a multithreaded system shares a common memory address space, while each program in a multiprogram system are independent from each other and can only communicate with each other through explicit IPC.

$\endgroup$
  • $\begingroup$ Multitasking is very definitely not just a user-interface term. Multitasking is what you are calling multiprogramming, and multiprogramming is a form of multitasking without preemption. $\endgroup$ – David Richerby Dec 8 '13 at 9:51
  • $\begingroup$ @DavidRicherby: No, you're incorrect; a computer system can be multitasking even when the OS doesn't support any form of multiprogramming or multithreading. Nowadays, the distinction has been lost because all modern OS supports processes and threads, that multitasking and multiprogramming become almost synonymous; but multitasking is a matter of what the user experiences and not about the capability of the processor/OS. Also, you're just plain incorrect by saying multiprogramming doesn't have preemption. That is just not true. $\endgroup$ – Lie Ryan Dec 8 '13 at 10:41
  • 1
    $\begingroup$ The phrases "co-operative multitasking" and "pre-emptive multitasking" would be completely meaningless if "multitasking" refered only to the user interface experience and not to the underlying operating system constructs. $\endgroup$ – David Richerby Dec 8 '13 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.