Mutitreading Notes

 https://www.bogotobogo.com/cplusplus/C11/1_C11_creating_thread.php


  1. Processes are independent while thread is within a process.
  2.  Processes have separate address spaces while threads share their address spaces.
  3. Processes communicate each other through inter-process communication.
  4. Processes carry considerable state (e.g., ready, running, waiting, or stopped) information, whereas multiple threads within a process share state as well as memory and other resources.
  5. Context switching between threads in the same process is typically faster than context switching between processes.
  6. Multithreading has some advantages over multiple processes. Threads require less overhead to manage than processes, and intraprocess thread communication is less expensive than interprocess communication.
  7. Multiple process concurrent programs do have one advantage: Each process can execute on a different machine (distribute program). Examples of distributed programs are file servers (NFS), file transfer clients and servers (FTP), remote log-in clients and servers (Telnet), groupware programs, and Web browsers and servers.

Comments

Popular posts from this blog

Difference between Structure and Array in C

new operator