Running head: HW5 1 HW5 Name of the Student Name of the Instructor Course Code Date
HW5 2 Question 1 (a): What is the difference between a process and a thread? Which one consumes more resources? Answer 1 (b): Process: A process is defined as an instance of a program being executed. A process contains the program code and the current activity it is going through. Every process has their own self-contained execution environment and every process has their own share of memory space. Thread: A thread is often considered as a light weight process. A process can contain multiple threads. Multiple threads share the same memory block as of the process. Threads are generally used for multiprocessing as threads have the ability to run concurrently into the memory. Communication between threads is much easier and also threads can disrupt each other any time as they contain the entire memory block. Process consumes more resources than threads.
You've reached the end of your free preview.
Want to read all 7 pages?
- Fall '08
- 60 seconds, #include, 120 seconds