0% found this document useful (0 votes)
29 views1 page

Differences Between Processes and Threads

1. Java threads provide built-in support for multithreaded programming in Java. Each thread defines a separate path of execution to reduce CPU waste and improve efficiency. 2. Windows threads are the basic unit to which the operating system allocates processor time, allowing parts of a process to execute concurrently even if being run by different threads. 3. The key differences between processes and threads are that processes represent a program in execution while threads are segments of a process. Processes are heavier weight and take more time to create, terminate and communicate between, while threads are lighter weight and more efficient in those areas.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views1 page

Differences Between Processes and Threads

1. Java threads provide built-in support for multithreaded programming in Java. Each thread defines a separate path of execution to reduce CPU waste and improve efficiency. 2. Windows threads are the basic unit to which the operating system allocates processor time, allowing parts of a process to execute concurrently even if being run by different threads. 3. The key differences between processes and threads are that processes represent a program in execution while threads are segments of a process. Processes are heavier weight and take more time to create, terminate and communicate between, while threads are lighter weight and more efficient in those areas.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ASSIGNMENT THREADS URK19CS1037

1. List the differences between process and threads.


2.
a. Java Thread
A thread is actually a lightweight process. Unlike many other computer
languages, Java provides built-in support for multithreaded programming. A
multithreaded program contains two or more parts that can run concurrently.
Each part of such a program is called thread and each thread defines a separate
path of execution. Thus, multithreading is a specialized form of multitasking.
The Java run-time system depends on threads for many things. Threads reduce
inefficiency by preventing the waste of CPU cycles.

b. Windows thread
A thread is the basic unit to which the operating system allocates processor
time. A thread can execute any part of the process code, including parts
currently being executed by another thread. A job object allows groups of
processes to be managed as a unit.
Parameter Process Thread
Process means a program is in Thread means a segment of a
Definition
execution. process.
Lightweight The process is not Lightweight. Threads are Lightweight.
Termination The process takes more time to The thread takes less time to
time terminate. terminate.
Creation time It takes more time for creation. It takes less time for creation.
Communication between Communication between threads
Communication processes needs more time requires less time compared to
compared to thread. processes.

You might also like