Describe the difference among the following: a. process and thread b. user-level thread and kernel-level thread c. uniprogramming and multiprogramming
Describe the difference among the following:
a. process and thread
b. user-level thread and kernel-level thread
c. uniprogramming and multiprogramming
d. preemptive and non-preemptive scheduling
e. paging and segmentation
As per our policy we can only answer first three sub question in the question .Please post other questions separately.
Difference between the process and the thread .
----> Process is the complete program running in the OS .The process consist of everything it requires . Only thing process have to do is run in the OS . The process does not depend on any other process . Also process takes time to execute in the OS.
-----> Thread is nothing but the subpart of the process . The single process can have the multiple threads running in it . The thread is the block of code mostly the loop running separately . The threads have various state . Those states can be the running, new, running, terminated.
1)Process is the execution of the complete program which is ready to execute in the OS.
1)Thread consist of the block of code to execute. Process can have multiple threads to execute.
2)Process consist of the whole program .Hence in the process it requires a lot of resources and the processing power.
2)Threads does not contain the memory consuming operations as compared to program.
3)Due to heavy work load in the process . The process take more time to execute as compared to thread. Also process take more time to terminate due to consuming the larger resources from the CPU.
3) Threads do not take much time to execute and terminate .Most of the time the threads are nothing but the loops . Once this loops finish the execution the thread stops running .
4) When we consider the process .The process runs isolated in the OS. Hence the process do not communicate with other process they are not efficient in the communication .
4) The threads are very efficient in communication as compared to the processes.
5) While working with the process as explained above the processes are not dependent on anything and run completely isolated. Similarly the termination of one process does not effect the other threads.
5)If the main thread is block all the other thread are terminated .
6)As the communication of the processes is not effective as compared to the threads. The process cannot share data from one process to another .
6)Threads can share the data from one thread to other as the threads can communicate with each other .
Step by step
Solved in 2 steps