Ahmed Task.docx - 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

Ahmed Task.docx - Running head HW5 1 HW5 Name of the...

This preview shows page 1 - 3 out of 7 pages.

Running head: HW5 1 HW5 Name of the Student Name of the Instructor Course Code Date
Image of page 1
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.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 7 pages?

  • Fall '08
  • WATSON-CURRIE
  • 60 seconds, #include, 120 seconds

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture