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.

Domain Name Server (DNS). Generic Domains, Country Domains, Inverse Domains

Domain Name Server (DNS). Generic Domains, Country Domains, Inverse Domains :

The purpose of DNS (Domain Name Server) is to translate domain names into IP addresses. A service is used for translating domain names into IP addresses.

Read More
How ATM works? Role of ATM in Internetworks and ATM network speed

How does a SIM card work? SIM card History and SIM card size :

SIM (Full form: Subscriber Identity Module or Subscriber Identification Module) card technology is one of the most popular technologies. The first SIM card was developed in 1991.

Read More
Transmission Modes, Describe Briefly - Simplex, Half-duplex, Full-duplex

Transmission Modes, Describe Briefly - Simplex, Half-duplex, Full-duplex :

Transmission mode refers to the mechanism of transferring data between two devices connected over a network basically this process called Communication Mode.

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