Threads & Processes :

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.

The similarity between Threads and processes:

  1. Only one thread or process is active at a time.
  2. Within process both execute sequentially
  3. Both can create children

Differences between Threads and processes

  1. Unlike processes, threads are not independent of one another.
  2. Unlike processes, all threads can access every address in the task.
  3. Threads are designed to assist each other, processes may or may not do it.

Why use treads?

There are some reasons to use threads in designing operating systems.

  1. A process with multiple threads make a great server for example printer server.
  2. Threads can share common data, they do not need to use inter-process communication.
  3. Because of its very nature, it can take advantage of multi-processors.


Different Types of Wireless Communication or Transmission

Different Types of Wireless Communication or Transmission :

In the present days, wireless communication system has become an essential part of various types of wireless, many devices used wireless communication.

Read More
Basics of Asymmetric Crypto-systems

Basics of Asymmetric Crypto-systems (Encryption, Decryption & Cryptography) :

In networking and telecommunications, it cannot be read by unauthorized users. Cryptography comes from the Greek words "secret writing".

Read More
Programming Language Generations - 1GL, 2GL, 3GL, 4GL, 5GL

Programming Language Generations - 1GL, 2GL, 3GL, 4GL, 5GL :

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

Computer Science Engineering

Special Notes

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.

CSE Notes