answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

What do you mean by multithread program in java?

A Program in Java that spawns multiple threads is called a multithreaded program in Java.


Distinguish the terms Program Process and Threads?

A program is an executable. A process is an executable that has been loaded into working memory and is currently executing the program. A thread is a thread of execution within a process. Every process has at least one thread, but threads can spawn additional threads as required to allow concurrent operations to be performed near-simultaneously.


How process and threads relate to CPU architecture?

A process is a program in execution,it needs resources like CPU time,memory,files and i\o devices to accomplish its task. Threads are lightweight process


What is the difference between single threaded and multithreaded in java?

A single threaded application is one that has only one thread of execution running at any given point of time. Whereas a multi-threaded application can have multiple threads of executing running simultaneously. Generally in enterprise applications, we need to fetch and load a lot of data before the system starts or initializes. In such cases, we typically spawn multiple threads and let the load operations run in parallel to save time. Lets say you need to fetch 10 different sets of data each of which will run for approximately 1 minute, if you run them all in sequence one by one, your system will load only after 10 minutes. But, if you spawn 10 threads, the system might load in around 2 minutes which is much faster than the single threaded time.


Can a multithread solution using multiple user level threads achieve better performance on a multiprocessor system than on a single processor system?

A multithreaded system comprising of multiple user-levelthreads cannot make use of the different processors in a multiprocessorsystem simultaneously. The operating system sees only a single processand will not schedule the different threads of the process on separateprocessors. Consequently, there is no performance benefit associatedwith executing multiple user-level threads on a multiprocessor system.

Related Questions

What mean by multithreaded program?

A multithreaded program is one that has multiple threads in execution. They may execute parallel to one another or totally without relation to one another. In Java you can create multithreaded programs using Java threads.


Which of the following components of program state are shared across threads in a multithreaded process a.Register values b.Heap memory c.Global variables d.Stack memory?

Yes but there is not enough time or enough space here for a full justification of the answer


What do you mean by multithread program in java?

A Program in Java that spawns multiple threads is called a multithreaded program in Java.


Why java called as multithreaded programming?

Java is called multithreaded because it allows the programmer to define multiple threads of execution manually. The main program would continue to execute as one thread and we can speed up the processing by declaring individual threads. Threads in Java can be created in two ways: 1. By extending the Thread class & 2. By implementing the Runnable interface


What of these components are shared by a multithreaded process?

There r some resources shared by different threads o the same process while some r not. The threads shares the address space,file,global variables. But each threads has its own stack , copy of registers(including PC).


What is the difference between single threaded and multi threaded process?

A write-up of the answer to this question can be found here:http://msdn.microsoft.com/en-us/library/ms693344(VS.85).aspx"There are two types of apartments: single-threaded apartments, and multithreaded apartments. * Single-threaded Apartments-Single-threaded apartments consist of exactly one thread, so all COM objects that live in a single-threaded apartment can receive method calls only from the one thread that belongs to that apartment. All method calls to a COM object in a single-threaded apartment are synchronized with the windows message queue for the single-threaded apartment's thread. A process with a single thread of execution is simply a special case of this model.* Multithreaded Apartments-Multithreaded apartments consist of one or more threads, so all COM objects that live in an multithreaded apartment can receive method calls directly from any of the threads that belong to the multithreaded apartment. Threads in a multithreaded apartment use a model called free-threading. Calls to COM objects in a multithreaded apartment are synchronized by the objects themselves."


Distinguish the terms Program Process and Threads?

A program is an executable. A process is an executable that has been loaded into working memory and is currently executing the program. A thread is a thread of execution within a process. Every process has at least one thread, but threads can spawn additional threads as required to allow concurrent operations to be performed near-simultaneously.


Which components of program state are shared across threads in a multi-threaded process?

a. Register values b. Heap memory c. Global variables d. Stack memory


What is Degree of Multiprogramming?

number of process in system number of threads in a program..


How process and threads relate to CPU architecture?

A process is a program in execution,it needs resources like CPU time,memory,files and i\o devices to accomplish its task. Threads are lightweight process


When to use threads in program?

You use threads whenever you want your program to do several things simultaneously.You use threads whenever you want your program to do several things simultaneously.You use threads whenever you want your program to do several things simultaneously.You use threads whenever you want your program to do several things simultaneously.


What is the importance of mutual exclusion and synchronization in the case of process cooperation?

to ensure that two concurrently-executing threads or processes do not execute the same code of a program at the same time. to control access to state both in small-scale multiprocessing systems -- in multithreaded environments and multiprocessor computers - and in distributed computers consisting of thousands of units - in banking and database systems, in web servers, and so on.