Which of the following option is False?a)An executing instance of a pr...
Processes have considerable overhead while threads have almost no overhead. Only option (B) is false.
View all questions of this test
Which of the following option is False?a)An executing instance of a pr...
False Option: b) Threads have considerable overhead while processes have almost no overhead.
Explanation:
Processes and threads are both crucial concepts in operating systems and concurrent programming. While there are differences between them, the false option in this case is that threads have considerable overhead while processes have almost no overhead.
Processes:
- A process can be defined as an executing instance of a program. It represents an independent unit of execution within an operating system.
- Each process has its own memory space and resources allocated to it, such as file handles, environment variables, and so on.
- Processes are isolated from each other, meaning they cannot directly access the memory or resources of other processes.
- Creation of a new process requires duplication of the parent process, including its code, data, and resources. This duplication involves a significant overhead in terms of time and memory.
Threads:
- A thread, on the other hand, is a subset of a process. It represents a single sequence of execution within a process.
- Threads within the same process share the same memory space and resources. They can directly access and modify each other's data.
- Creation of a new thread is relatively lightweight compared to creating a new process. It involves allocating a new stack and some additional bookkeeping, but does not require duplicating the entire process.
- Threads within the same process can communicate with each other more efficiently compared to inter-process communication, as they share the same memory space.
Overhead:
- Overhead refers to the additional resources or processing required to support a certain operation.
- Threads generally have less overhead compared to processes because they share the same memory space and resources within a process.
- When a new process is created, it involves duplicating the entire parent process, resulting in higher overhead in terms of time and memory.
- On the other hand, creating a new thread within a process is relatively lightweight and has lower overhead, as it does not require duplicating the entire process.
Therefore, the false option in this case is that threads have considerable overhead while processes have almost no overhead. In reality, processes have higher overhead compared to threads.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).