Welcome to Home.

Tuesday, August 2, 2016

Multithreaded programming




          Multi - threaded programming

Those who are familiar with the modern operating systems such as Windows 10, Windows 8, Mac may recognize that they can execute several programs simultaneously. This ability is known as multitasking. In system’s terminology it is called multi threading.

Multi threading is a conceptual programming paradigm where a program (process) is divided into two or more subprograms (processes), which can be implemented at the same time in parallel. For example, one subprogram can display an animation on the screen while another may build the next animation to be displayed. This is something similar to dividing a task into sub task and assigning them to different people for execution independently and simultaneously. In most of our computers, we have only a single processor and therefore, in reality, the processor is doing only one thing at a time. However, the processor switches between the processes so fast that it appears to human beings that all of them are being done simultaneously.


          Java programs that we have seen so far contain several threads as working agents for the completion of java programs/ applications at any point of time, there is only one statement under execution. A thread is similar to a program that has a single flow of control. It has a beginning, a body, and an end and executed commands sequentially.

No comments:

Post a Comment