Processes 'n Threads

Threads do not and cannot steal time from other threads, whereas processes do steal time of other fellow processes. 
Kelley Lenard
Program, lines of code written for the purpose of doing some task. Process, a program brushed and polished ready and executing. Thread, a lightweight process. These three words are the ones we come accross in our day to day life. Be in our professional as well as non professional days, these words have become so inevitable. Also, we all know what exatly does it mean, but do we?

Let me take a simple example to make things clear. I write a c program and save it in my hdd, then it is a program. On compilation, the compiler converts the high level language coded c program into a low level file. This file (a.out) resides in the hdd and are still called a program. Now on execution, the operating system reads this code and create a special data structure and place it in the RAM (main memory). This structured entity in the RAM is called a process.

Now for understanding the concept of a thread, let us consider a banking system. Account holders log in and access their accounnt details which resides in the bank's server. Thus here more than one person may request information from the server and thus each of these new people are actually creating new threads and working simultaneously.

The major differences between a process and a thread is easily available all over the internet.

- all information is stolen from different websites.
- hdd infers hard disk drive.
- Ravindrababu Ravula is a cool personality to follow.

Comments

Popular Posts