Process and Thread Management: WhatsApp Case Study on Parallel Execution
Identification and Definition of Processes
- The speaker establishes that in the system being observed, every individual entity is a process: "This once each one you see is a process."
- A specific identification is made regarding a single instance or unit: "That guy is one process."
Understanding the Thread Perspective
- The focus shifts from the macro-level process to the micro-level thread execution.
- The speaker asks the listener to internalize the perspective of the thread: "Now you wanna see the thread as you are thread."
Practical Application: The WhatsApp Architecture
- WhatsApp is used as the primary case study to illustrate the breakdown of software into execution units: "So let's take WhatsApp. Right? Right? So this is WhatsApp. Right?"
- The speaker explains that high-level applications do not function as single units but rather decompose into smaller parts: "See, how WhatsApp breaks down the threads into multiple one."
Parallelism and Functional Specialization
- A critical characteristic of the threading in WhatsApp is concurrency: "and they run-in parallel."
- The application assigns specific responsibilities to individual threads to maintain efficiency.
- The speaker identifies a dedicated thread for communication tasks: "They have one for network."
- By utilizing a specific network thread, the application can handle data transmission and reception simultaneously with other internal processes.