answersLogoWhite

0

What is the definition of thread?

Updated: 11/9/2022
User Avatar

Wiki User

12y ago

Best Answer

A computer runs many applications at once, each instance of an application is known as a process. Each process is made of 1 or more threads, each thread is a sequence of code, this code is often responsible for one aspect of the program, or one task a program has been given. For instance a program doing a complex long calculation may split into two threads, one to keep a user interface responsive, and one (or more) to progress through the lengthy calculation.

The catch is that when dealing with one or more threads, whilst it is guaranteed each individual thread will progress through its code in sequence, it is not known where each thread will be relative to each other. That is, one thread may progress more quickly than other threads, this means great care must be taken when two threads access one resource, this is usually done through a mutex.

Answer

In computing terms, a thread is a separate line of execution inside a process which shares the instruction portion of the process, but which has unique data associated with that thread.

To use an analogy: let's assume we have to make 10 cakes. A normal process would start with its instructions (the cake recipe), and the data (the ingredients for the 10 cakes), then follow the recipe iterative (repetitively) 10 times in sequence, producing 10 cakes. A threaded model for this would say: "but, making cake 4 does not require the exact same egg being used to make cake 2 (that is, there is an egg (data) for each cake)." So, using threads, each thread would use the same instructions (recipe), but have its own unique data (set of ingredients).

The problem with threads (as brought up above) is when they must share some resource. In our example, let's assume we only have 1 oven. So, each of the threads would go about preparing it's cake, then go over to use the oven. The first thread to get there would make a lock (mutex) on the oven to bake its cake. The remaining threads would sit around and wait for the lock (mutex) to be cleared, then one of them would grab it, and bake its cake.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the definition of thread?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the definition of the word thread?

the definition of the word thread isa fine cord made of fiberstwisted together, used in needelwork and weaving cloth.


What is the definition of a w.w.unf thread size?

Wirld wide unified fine


Definition of a thread take-up lever?

ano ba yan ang gulo....


What is the definition of female thread?

a helical groove in a cylindrical hole (female thread), formed by a tap or lathe tool, or a helical ridge on a cylindrical bar, rod, shank, etc


What is the definition of a unf thread size?

Unified National Fine as opposed to UNC - Unified National Course


Definition for spiders spinners?

spinnerets:any number of different organs which the silk, gossamer or thread of spiders, and silkworms produce.


What is the definition of the word threaded?

It is the past form of the verb to thread and an adjective meaning having threads. E.g.-- She threaded her needle with gold thread. The end of the pipe is threaded so that you can screw a cap onto it.


Definition of pitch of screw thread?

The pitch of a screw thread is a measure of how closely the threads are spaced. It can be expressed as the number of threads per unit length (32 threads per inch, for example) or as the distance between two threads ( such as .8 mm).


Definition of social instability?

There are quite a few definitions of social instability that are accepted. The general thread between them all is that the environment of the individual is constantly changing.


Different types of threads in OS?

There are many different thread forms in use today. The most common are; BPV thread API thread profile gauge Thread profile gauge API 5b thread gauges API thread gauges Pipe thread gauges API Thread Gauge Manufacturer & Supplier Ring gauge use Pipe threader Acme thread Feeler gauge set Ring gauge set threaded pipe plug step gauge NPT thread gauge Tapered pipe thread


What is the definition of threadbear?

Thread Bears® is a company that makes handmade items from fibers, such as crocheted, knitted, needle-felted, or sewn animals and dolls. These items are usually jointed and miniature. Many items are also fulled, or felted and gently aged. Primarily offered to collectors. Singular form: Thread Bear®. Also: threadbear, thread bears, threadbears.


Is an EUE thread a Non-Pressure sealed thread?

EUE thread is a pressure sealed thread as usual completion pup joints thread