Java Threading

Started by sharmila banu.m, Jun 09, 2009, 08:01 PM

Previous topic - Next topic

sharmila banu.m

What is Multithreading? Explain how Java supports programming for multitasking environment.


A thread is one of the processes of an application. In multithreading, an OS allows different threads of an application to run in parallel.

The multitasking environment can execute in two ways.

• Process based multitasking
• Thread based multitasking

Process based multitasking –Process based multitasking is when two different processes, running at different locations, execute simultaneously. E.g.: A user can write some text using editor and simultaneously play music.

Thread based multitasking – A thread is the smallest unit of a dispatchable code.
Two different tasks like printing a document and editing it simultaneously can be done in a thread based multitasking environment.
Threads can be implemented in Java using the Thread Class.
The threading concept says that the different blocks of the same program can be executed concurrently.




Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview