what is multitherading

Answers were Sorted based on User's Feedback



what is multitherading..

Answer / kanu

Multithreading allows two parts of the same program to run
concurrently.
Thread-based multitasking is having a program perform two
tasks at the same time. For example, a word processing
program can check the spelling of words in a document while
you write the document. This is thread-based multitasking.

Is This Answer Correct ?    14 Yes 5 No

what is multitherading..

Answer / john noah

In a single threaded system program executes in a sequence
line by line. Multithreaded system can allow multiple
threads to execute a program parallel in multiple instances.

If there is any part of code dealing with the object data
modification, there is no guarantee that it will not be
attempted any more than one thread at a time.

there's a need to make sure that such kind of code should be
executed exclusively. To achieve this in Java we a concept
of LOCK. Using Lock mechanism thread holds complete hold on
an object and object is also can not be access any other
thread except the thread holding that lock. Lock is an
object level control and one thread only can hold it at a time.

Is This Answer Correct ?    8 Yes 0 No

what is multitherading..

Answer / rahul

Feb 01, 1997 By Martin McCarthy
inSysAdmin
With the 2.0 kernel, most Linux users now have the
capability of using multi-threaded processes—well, what
does that mean?
Perhaps one of the reasons you use Linux is because it is a
multi-tasking operating system. In which case you are
probably well aware of the utility of being able to do more
than one thing at a time—perhaps compiling the utility
which will bring you fame and fortune whilst editing a
letter of resignation to your boss. So you might recognise
the utility of an individual process that can do more than
one thing at once.

When might this be a good idea? One application for multi-
threading is a program which relies on a large number of
very similar and independent mathematical operations—the
oft-quoted example of this is matrix multiplication. We
look at a simple example of a multi-threaded matrix
multiplier later in this article.

Another type of application which can benefit from multi-
threading is a server application. Whenever a client
attempts to connect to the server, a new thread can be
created to look after that client whilst the “watcher”
thread continues to wait for more clients to connect.

“But wait!” I hear you cry. “Lots of server applications
already work like that, but they simply fork another
process rather than starting another thread.”

“You're right...” I reply.

“Don't interrupt,” you continue. “This sounds like another
way of doing the same thing, but for no good reason other
than to say it's a `multi-threaded application' and so you
can bump up the price to those who like to be blinded by
science.”

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

How is rounding performed under integer division?

2 Answers   Satyam,


How does marker interface provides functionality to the implemented class ? or How dose maker interface gets the functionalities as serialization or cloning.

4 Answers   Cap Gemini,


What is tcp ip in java?

0 Answers  


What is polymorphism and what are the types of it?

0 Answers  


What is the life-cycle of an object?

2 Answers   Broadridge, Syntel,






can we take more than one null values for Unique constraints.

1 Answers   3i Infotech,


How do you control extraneous variables?

0 Answers  


waht You know about thread programming?

1 Answers  


Why we use methods in java?

0 Answers  


Compare java and python.

0 Answers  


Is null == null in java?

0 Answers  


What is subsequence of a string?

0 Answers  


Categories