user3599561
user3599561

Reputation: 103

What are the Types of Process and Thread in Operating System?

I have been learning O.S in which it is written that there are two types of Process

1) CPU Bound Processes 2) I/O Bound Processes.

and somewhere its

1)Independent Processes 2)Cooperative Processes.

same goes for Threads

1) Single Level Thread. 2) Multilevel Thread.

and

1)User Level Thread 2)Kernel Level Thread.

Now confusion is that if someone asks me about Types of Process and Thread so which ones should i tell them, from above?

Kindly Make My Concept Clear?

I shall remain thankful to you!

Upvotes: 3

Views: 29467

Answers (4)

kuldeep sahu
kuldeep sahu

Reputation: 1

Category of process: 1.Independent/isolated/competing. 2.Dependent/co-operating/concurrent.

1.Independetn:Execution of one process does not effect the execution's of other process that means there is nothing common for sharing.

2.Dependent:in it process can share some deliver buffer variable ,resources,(cpu,printer). it process can share any thing, then execution of one process can effect other. ->execution of one process can effect or get affected by the execution of process.

Upvotes: 0

Am_I_Helpful
Am_I_Helpful

Reputation: 19158

Processes are two types based on their types of categories. The first one which you mentioned is related to event-specific process categorization and the next categorization is based on their nature. But, if someone asks you, you should ask for more clarification as to which type of category does he/she wants the classification. If null, then you should state the first(default) category as shown below:-

  1. Event-specific based category of process

a) CPU Bound Process: Processes that spend the majority of their time simply using the CPU (doing calculations).

b) I/O Bound Process: Processes that are associated with input/output-based activity like reading from files, etc.

  1. Category of processes based on their nature

a) Independent Process: A process that does not need any other external factor to get triggered is an independent process.

b) Cooperative Process: A process that works on the occurrence of any event and the outcome affects any part of the rest of the system is a cooperating process.

But, Threads have got only one classification based on their nature(Single Level Thread and Multi-Level Threads).

Actually, in modern operating systems, there are two levels at which threads operate. They are system or kernel threads and user-level threads. This one is generally not the classification, though some of them freely do classify. It is a misuse.

If you've further doubts, leave a comment below.

Upvotes: 13

S B Rakib Morsalin
S B Rakib Morsalin

Reputation: 1

What is a Process? A process is a program in execution. Process is not as same as program code but a lot more than it. A process is an 'active' entity as opposed to program which is considered to be a 'passive' entity. Attributes held by process include hardware state, memory, CPU etc.

Process memory is divided into four sections for efficient working :

The Text section is made up of the compiled program code, read in from non-volatile storage when the program is launched. The Data section is made up the global and static variables, allocated and initialized prior to executing the main. The Heap is used for the dynamic memory allocation, and is managed via calls to new, delete, mallow, free, etc. The Stack is used for local variables. Space on the stack is reserved for local variables when they are declared.

Upvotes: 0

Sunny
Sunny

Reputation: 1

Basically there are two types of process:

  1. Independent process.
  2. Cooperating process.

For execution a process should be mixer of CPU bound and I/O bound.

CPU bound: is a time process reside in processor and perform it's execution. I/O bound: is a time in which a process perform input output operation.e.g take input from keyboard or display output in monitor.

Upvotes: 0

Related Questions