Threads and process, advantages and disadvantages in Operating systems

What are Threads?

One big process consists of one or multiple small threads. Threads are managed and scheduled separately by the scheduler. 

thread vs process

Figure: Threads

The difference between thread and process:

ThreadsProcess
LightweightHeavyweight
Utilize fewer resources Utilize more resources
Switching does not need interaction with OS Switching needs interaction with OS
Share the memory with other threadsDoes not share the memory with other processes
Multiple threads can write, read and can perform many actions with each other.All processes execute independently to each other.

Similarities of thread and process:

  • Both can share CPU
  • Both can create a child
  • If one block then other can run

Advantages of threads:

  • Reduce context switching.
  • Increase processing speed.
  • Don’t need for inter-process communication.
Fazal Rehman Shamil Click Here to Know More
Instructor, Researcher, Blogger, SEO Expert, Poet and Publisher of International Journal Of Software, Technology & Science ISSN : 2616 - 5325
Dear Professors and Resarchers!You are welome to Cite these tutorials in your research or slides etc. Please don't forget to mention the reference of website. Copy Paste of text is strcitly forbidden. Images can be reuse because images are protected with watermark.

Leave a Reply

Your email address will not be published. Required fields are marked *