answersLogoWhite

0

What are threads?

Updated: 8/9/2023
User Avatar

Wiki User

18y ago

Best Answer

Many programming languages, operating systems, and other software development environments support what are called "threads" of execution. Threads are similar to processes, in that both represent a single sequence of instructions executed in parallel with other sequences, either by time slicing or multiprocessing. Threads are a way for a program to split itself into two or more simultaneously running tasks. (The name "thread" is by analogy with the way that a number of threads are interwoven together)

User Avatar

Wiki User

18y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

16y ago

Processes can be scheduled independently and have (by default) distinct address spaces, so explicit coordination is needed for IPC. This tends to improve safety, as a bug in one process will probably not crash another process.

Threads can be scheduled independently and share a common address space, which makes implicit IPC straightforward (if you remember to avoid races by using locks) but which isn't good for safety when one thread is buggy.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Threads allow for multiple lines of execution in a program - your program can be doing more than one thing at a time.

If multiple processors are available, the threads can be distributed among them; thus the program will really be doing several things at the same time. In the case of a single processor, the threads of the highest priority will share processor time; since switching from one thread to another is fairly fast, it may seem as if they were working at the same time.

Multithreading makes it easier for a program to do some background processing, while it waits for user input for example. If the user presses a key, a higher-priority thread may be started to react to the key; but if there is no user input, the program may do some background processing instead. An interesting example is Microsoft Word, which does spell-checking in the background. While I don't know how they programmed this, multithreading seems the best way to do it.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

advantage of threads is like running 2 concurrent processes. for example, now ur appln acts like a main thread and executes sequentially line over line. But when u start a thread in the middle,, the main thread i.e; the appl'ns thread executes as well as the thread started also executes the function that it has to execute,, both of which happen simultaneously. In short ur execution time will be reduced..

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

i like your site and trust on you people i like your site and trust on you people

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are threads?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Are NPT pipe threads compatible with NPSM threads?

No, NPT threads are not compatible with NPSM threads. A pipe with NPT threads tapers slightly, while an NPSM-threaded pipe does not taper.


Different kind of threads in MFC?

There are two main kinds of threads implementations: User-space threads and Kernel-supported threads. Mikaela


Whats the difference between plumbing pipe threads and conduit pipe threads?

Plumbing pipe threads are squared and conduit pipe threads are tapered.


What are directional threads in fabric?

The long threads are called the warp and the shorter cross threads are called the weft.


What npt pipe threads full name?

National Pipe Threads or the Briggs Standard NFT = National fine threads NCT National corse threads ASAE America society of auto engineer threads etc


What are the differences between Internal and External threads?

Internal threads are threads inside of a hole in something. Like a nut, for instance. External threads are threads on the outside of a cylindrical object. Like a bolt, for instance. hth, Steve


What is a 60's slang word that is equivelent to nice cloths?

Cool threads Boss threads Hip threads


When did Threads of Fate happen?

Threads of Fate happened in 1999.


What is Campus Threads's population?

Campus Threads's population is 2,009.


When was Broken Threads created?

Broken Threads was created in 1917.


When was Campus Threads created?

Campus Threads was created in 2006.


Is user level threads are transparent to kernel level threads?

user level theads are not tranparent to kernel level threads.