A thread's "working memory" -- opstack, lva, other?

Hi,

In reading section 8.1 of the JVM spec:

(http://java.sun.com/docs/books/vmspec/2nd-edition/html/Threads.doc.html#22197)

... I have these two questions:

1) I see it refers to a thread's "working memory". What exactly is this? At first I thought it was any information that was located on the thread's operand stack. Then I thought maybe it was the thread's local variable array. Now I'm not sure what to think... is it totally separate from both of these?

2) This section states that the *thread* performs the use/assign/load/store/lock/unlock ops, and that that the *MMSS* (Main Memory SubSystem) performs the read/write/lock/unlock ops. Okay, fine... but then it says later in that section that "A single thread issues a stream of use, assign, lock, and unlock ops..". Okay, so what happened to "load" & "store"? Maybe the term "thread" is supposed to refer only to the execution engine and not this "working mem"? Okay, let's go with that. Then later... "The underlying JVM impl is required to perform appropriate load/store/read/write ops.." Oh really? I thought it just said that the *thread* and the *MMSS* perform those? So confused!

Please help,

--Will

[1221 byte] By [will608a] at [2007-10-3 1:09:30]
# 1

> Hi,

>

> In reading section 8.1 of the JVM spec:

> (http://java.sun.com/docs/books/vmspec/2nd-edition/htm

> l/Threads.doc.html#22197)

> ... I have these two questions:

>

> 1) I see it refers to a thread's "working memory".

> What exactly is this? At first I thought it was any

> information that was located on the thread's operand

> stack. Then I thought maybe it was the thread's

> local variable array. Now I'm not sure what to

> think... is it totally separate from both of these?

>

> 2) This section states that the *thread* performs

> the use/assign/load/store/lock/unlock ops, and that

> that the *MMSS* (Main Memory SubSystem) performs the

> read/write/lock/unlock ops. Okay, fine... but then

> it says later in that section that "A single thread

> issues a stream of use, assign, lock, and unlock

> ops..". Okay, so what happened to "load" & "store"?

> Maybe the term "thread" is supposed to refer only to

> the execution engine and not this "working mem"?

> Okay, let's go with that. Then later... "The

> underlying JVM impl is required to perform

> appropriate load/store/read/write ops.." Oh really?

> I thought it just said that the *thread* and the

> *MMSS* perform those? So confused!

>

> Please help,

> --Will

1. The thread's operand stack is not the same as the working memory of the thread. The term "working memory" is deliberately abstract since where it is located is dependent on the vm implementation (registers, cache etc can all make up the "working memory")

2. The thread can perform load and store operations, but in the specific case you describe the underlying vm implementation performs those operations to obey a certain set of constraints defined later in that section.

YoGeea at 2007-7-14 18:06:24 > top of Java-index,Java HotSpot Virtual Machine,Specifications...