They sound similar, but are very different. Multitasking refers to the ability of the operating
system to execute multiple programs simultaneously. The processing time is shared between the
programs. In preemptive multitasking, the OS divides the time between processes. In cooperative
multitasking, the processes control the CPU for as long as it needs and then releases it for the next
process to take ownership of the CPU. For example, multitasking in the Windows OS enables the
user to use MS Word and MS Excel at the same time. Windows 2000 is preemptive, but
Windows3.1 is cooperative (that's why one misbehaved application freezes the whole system).
Multithreading refers to the ability of the operating system to execute multiple parts of a process
simultaneously. The threads usually have access to the resources allocated by the main thread
(process). Multithreading is usually used to do background processing without affecting the
responsiveness of the program. For example, the user can browse the internet while the browser is
downloading a file because the download is performed by a different thread.
In some instances a pseudo multithreading can be created using multitasking, but the overhead of
creating a new process as opposed to creating a new thread can be prohibitive.
system to execute multiple programs simultaneously. The processing time is shared between the
programs. In preemptive multitasking, the OS divides the time between processes. In cooperative
multitasking, the processes control the CPU for as long as it needs and then releases it for the next
process to take ownership of the CPU. For example, multitasking in the Windows OS enables the
user to use MS Word and MS Excel at the same time. Windows 2000 is preemptive, but
Windows3.1 is cooperative (that's why one misbehaved application freezes the whole system).
Multithreading refers to the ability of the operating system to execute multiple parts of a process
simultaneously. The threads usually have access to the resources allocated by the main thread
(process). Multithreading is usually used to do background processing without affecting the
responsiveness of the program. For example, the user can browse the internet while the browser is
downloading a file because the download is performed by a different thread.
In some instances a pseudo multithreading can be created using multitasking, but the overhead of
creating a new process as opposed to creating a new thread can be prohibitive.
Comments
Post a Comment
https://gengwg.blogspot.com/