What is the basic difference between threads and processes? , JAVA Programming

Assignment Help:

A process is an execution of a code but a thread is a single execution sequence within the process. A process may contain multiple threads. A thread is sometimes named a lightweight process.

 

1220_Untitled.png

 

A JVM runs in a single threads and application in a JVM share the heap belonging to that process. That is why various threads may access the same object. Threads share the heap and have their own stack memory space. This is how one thread's call of a method and its local variables are remain thread safe from other threads. But the heap is not thread-safe and has to be synchronized for thread safety.

 


Related Discussions:- What is the basic difference between threads and processes?

Program that compute prime numbers, The purpose of this assignment is to gi...

The purpose of this assignment is to give you practice working with one dimensional arrays. It will also introduce you to one of the oldest mathematical algorithms in the world. No

Code, Alia is appearing for the board exams. In order to qualify for the ne...

Alia is appearing for the board exams. In order to qualify for the next class Alia need to get exactly X credits. In current semester Alia has to study N number of subjects, and ev

Tictactoe, write complete application to play game tictactoe

write complete application to play game tictactoe

Create an application for Koch’s Cottages, Create an application for Koch’s...

Create an application for Koch’s Cottages, a weekend getaway resort that rents cottages and boats to use on the local lakenimum 100 words accepted#

Developed an asteroids game, In the previous assignments, we have developed...

In the previous assignments, we have developed an Asteroids game. In this assignment, we are going to use the same codebase to develop a different gameplay. The inspiration for thi

Illustrate normalization? , Normalization is a design technique that is m...

Normalization is a design technique that is mostly used as a guide in designing relational databases. Normalization is necessary a two step process that gives data into tabular f

Data Structures Projects, I have three data structures projects that I need...

I have three data structures projects that I need help with.

Plug-in for adobe after effects, Plug-in for Adobe after Effects Project...

Plug-in for Adobe after Effects Project Description: We are seeking software engineers to create a plug-in for Adobe after Effects (CS4 and above) that allows 3D extrusions f

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd