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?

Design and implement online food delivery system, You are required to  desi...

You are required to  design & implement  online  food delivery  system  using Java RMI technology.  This involves writing both the server and the client program(s). Client programs

What is the basic principle of rmi architecture, The RMI architecture is ba...

The RMI architecture is based on one significant principle: the definition of behavior and the execution of that behavior are separate concepts. RMI allows the code that describes

Simulated annealing, implement simulated annealing for cable company proble...

implement simulated annealing for cable company problem

Develop e-commerce website, Develop E-Commerce Website I need an E-Comme...

Develop E-Commerce Website I need an E-Commerce website for my furniture shop which requires to an online store to buy products online. So, Skills required: HTML, Java, Gr

I need ios and android developer, We need a very good iOS and/or Android de...

We need a very good iOS and/or Android developer preferred to be from Egypt. He will be responsible in developing iOS or/ and Android apps for a company. All details will be provid

War file for your application that can be deployed on tomcat, Deliverable: ...

Deliverable:  1) WAR file for your application that can be deployed and run on TomcaT (War file must contains the Java source code) Requirement for application: 1. Application m

Need help, please fix polygon method, code below: /** * @(#)AnimationExtr...

please fix polygon method, code below: /** * @(#)AnimationExtraCredit.java * * AnimationExtraCredit Applet application * * @author * @version 1.00 2013/5/5 */ import jav

Encapsulation, Defines to keeping all the related members together in an ob...

Defines to keeping all the related members together in an object. Specifying member variables as private may hide the methods and variables. Objects should hide their inner working

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