CS 18000 Lecture Notes - Lecture 12: Java Virtual Machine, Program Counter, Control Flow

14 views4 pages

Document Summary

Control flow: at any time in a (sequential) java program, there is a currently executing . Operator: execution of a (sequential) java program is mostly a sequence of operations . The fetch-execute cycle (a simplified view : the jvm performs a fetch-execute cycle . Fetch the instruction from the current location (also known as program counter or pc ) in memory. Update the current location (either to next location in memory or as a side effect of executing the current instruction, e. g. , a jump instruction) Repeat: think of the pc as an arrow pointing to the instruction being executed. A single thread of execution weaves its way through your program. A single pc ( program counter ) identifies the current instruction being executed: concurrent: Multiple threads of execution are running simultaneously through your program. Multiple pcs are active, one for each thread. Java threads: thread class with run() method, allows creation and manipulation of threads import java. lang.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents