Answer Posted / ram nidadavolu
A multithreaded program contains two or more parts that can
run concurrently, Each part a program is called thread and
each part that defines a separate path of execution.
Thus multithreading is a specified from of multitasking .
There are two distinct types of multitasking .
Process: A Process is , in essence , a program that is
executing.
2 Process-based :is heavy weight- allows you run two or
more programs concurrently.
Eg: you can use JAVA compiler at the same time you are using
text editor.
Here a program is a small unit of code that can be
dispatched by scheduler .
Thread-based: is Light weight- A Program can perform two or
more tasks simultaneously.
Creating a thread:
Eg: A text editor can formate at the same time you can
print, as long as these two tasks are being perform separate
threads.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a class loader?
What is a clone?
What is the difference between system.out ,system.err and system.in?
hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me
What is the RMI and Socket?
Explain the different types of memory used by jvm?
What is synchronization and why is it important?
Explain phantom read?
Which are the different segments of memory?
How to deploy Jar, War files in J2EE?
What are the different types of exception?
Can you control when passivation occurs?
What class is used to create Server side object ?
How many times may an objects finalize() method be invoked by the garbage collector?
What is a sessionfactory? Is it a thread-safe object?