CS-405 - Operating Systems
1
Posts
1
Users
0
Reactions
1,711
Views
Topic starter
02/08/2025 8:39 am
Feature | Process | Thread |
---|---|---|
Definition | An independent program in execution. | A lightweight unit of a process. |
Memory | Has its own memory space. | Shares memory and resources with other threads. |
Overhead | High (due to separate memory and context info). | Low (shares memory, faster context switching). |
Communication | Slower (needs Inter-Process Communication). | Faster (via shared memory). |
Execution | Independent execution. | Runs as part of a process; multiple threads can run concurrently. |
Creation | Slower to create and manage. | Faster and more efficient to create. |
Crash Impact | One process crash usually doesn’t affect others. | If one thread crashes, it may crash the entire process. |
Used For | Running independent programs. | Performing multitasking within a single program. |