InterviewSolution
| 1. |
What do you understand about Threads in Operating Systems? |
|
Answer» A thread is a single sequential flow of task execution in a process, and it is also known as a thread of execution or a thread of control. Thread execution is possible within any operating system's process. Aside from that, several threads can exist within a process. A distinct program counter and a stack of activation records and control blocks are used by each thread of the same process. Threading is frequently referred to as a light technique. A process can be broken down into numerous threads. MANY tabs in a BROWSER, for example, can be considered as threads. MS Word employs many threads to prepare the text in one thread, receive input in another thread, and so on. Within a process, a thread is a single sequence stream. Threads have the same qualities as the process, hence lightweight processes are referred to as threads. Threads are executed one after the other, giving the appearance that they are running in parallel. Each thread has a unique state. Each thread is unique and has the following in them:
Threads are not self-contained since they share code, data, and other Operating System resources. There are two types of threads:
|
|