MULTI-THREADING
Multithreading is a specialized form of multitasking and
a multitasking is the feature that allows your computer to
run two or more programs concurrently. In general, there are
two types of multitasking: process-based and thread-based.
Process-based multitasking handles the concurrent execution
of programs. Thread-based multitasking deals with the concurrent
execution of pieces of the same program.
A multithreaded program contains two or more parts that can run
concurrently. Each part of such a program is called a thread,
and each thread defines a separate path of execution.
C++ does not contain any built-in support for multithreaded applications.
Instead, it relies entirely upon the operating system to provide this feature.
This tutorial assumes that you are working on Linux OS and we are going
to write multi-threaded C++ program using POSIX. POSIX Threads, or
Pthreads provides API which are available on many Unix-like POSIX
systems such as FreeBSD, NetBSD, GNU/Linux, Mac OS X and Solaris.
No comments:
Post a Comment