A thread is a single sequence stream within a process. Because of some properties of processes, they are called lightweight processes. In a process, threads allow multiple executions of the streams. The CPU switches rapidly back and forth among the threads giving illusions that the threads are running in parallel. Like, a traditional process i.e., a process with one thread, a thread can be in any of several states(running, blocked, ready, or terminated). Each thread has its stack. since threads generally call different procedures and thus a different execution. This is why the thread needs its stack. In an operating system that has a thread facility, the basic unit of CPU utilization is a thread. Threads are executed one after another thread has different states. It has a program counter, register set stack space. Threads are not independent of each other as they share the code, data, OS resources, etc.
In a thread-based operating system, a process consists of an address space and one or more threads. Each thread of a process has its program counter, register states, and stack. But all threads of a single process share the same address space.
There are some reasons to use threads in designing operating systems.
In the present days, wireless communication system has become an essential part of various types of wireless, many devices used wireless communication.Read More
In networking and telecommunications, it cannot be read by unauthorized users. Cryptography comes from the Greek words "secret writing".Read More
A programming language is a set of written symbols that instructs the computer hardware to perform specific tasks. Typically, programming language consists of a vocabulary.Read More
It's a special area where you can find special questions and answers for CSE students or IT professionals. Also, In this section, we try to explain a topic in a very deep way.