Skip to content

Latest commit

 

History

History

java-multithreading

MULTITHREADING

  • ClientAB & MultiThreadServerAB - console app
  • Client & MultiThreadServer - with GUI

Notes:

  • A multiprocessing system has more than two processors whereas Multithreading is a program execution technique that allows a single process to have multiple code segments.
  • Processes are typically independent of each other, While threads exist as the subset of a process. Threads can communicate with each other more easily than processes can, But threads are more vulnerable to problems caused by other threads in the same process.
  • A process is a program under execution i.e an active program. A thread is a lightweight process that can be managed independently by a scheduler. Processes require more time for context switching as they are more heavy. Threads require less time for context switching as they are lighter than processes.
  • Each process contains a single or multiple threads of execution. If a process has a single thread, only one action can be performed at a time. If a process has multiple threads, it can perform multiple actions at the same time. A thread is a sequence of instructions that can be executed independently from other code.