OperatingSystemsCh5Process Communication & Synchronization1
Operating Systems Ch5 Process Communication & Synchronization 1
Story so far..· Process concept + operations- Programmer's perspective + kernel's perspectiveThread-Lightweight process We mainly talked about the stuffs related to a singleprocess/thread, what if multiple processes exist..2
Story so far. • Process concept + operations – Programmer’s perspective + kernel’s perspective • Thread – Lightweight process • We mainly talked about the stuffs related to a single process/thread, what if multiple processes exist. 2
Processes. The processes within a system may be-independent or: Independent process cannot affect or be affected by otherprocesses-cooperating· Cooperating process can affect or be affected by otherprocesses Note: Any process that shares data with others is acooperating process3
3 Processes • The processes within a system may be – independent or • Independent process cannot affect or be affected by other processes – cooperating • Cooperating process can affect or be affected by other processes • Note: Any process that shares data with others is a cooperating process
CooperatingProcesses. Why we need cooperating processes-Information sharing: e.g., shared file-Computationspeedup·executing subtasks inparallel-Modularity: dividing system functions into separate processes-Convenience: single user can have multiple processes to execute many tasks4
4 Cooperating Processes • Why we need cooperating processes – Information sharing • e.g., shared file – Computation speedup • executing subtasks in parallel – Modularity • dividing system functions into separate processes – Convenience • single user can have multiple processes to execute many tasks
s communication (IPC)Inter-process- What and how?
5 P P P Inter-process communication (IPC) - What and how?