Chapter 9: JVM Structure and Garbage Collection
This chapter will provide you with an overview of the structure and behavior of a Java virtual machine (JVM), which are more complex than you may expect.
A JVM executes instructions according to the coded logic. It also finds and loads the .class
files that are requested by the application into memory, verifies them, interprets the bytecode (that is, it translates them into platform-specific binary code), and passes the resulting binary code to the central processor (or processors) for execution. It uses several service threads in addition to the application threads. One of the service threads, called garbage collection (GC), performs the important step of releasing the memory from unused objects.
By completing this chapter, you will understand what constitutes Java application execution, the Java processes inside the JVM and GC, and how the JVM works in general.
In this chapter, we will cover the following topics:
- Java...