8

I am trying to draw diagrams that show the difference between system virtual machines and Java virtual machines.

The first two images looks correct to me. But I don't know how to draw the third.

Image 1:

enter image description here

Image 2:

enter image description here

Image 3:

enter image description here

As you see, both red blocks and gray frames have the same captions: "JVM". I don't think it is correct. I'm sure that caption should be different: "JVM" for gray frames and "something different" for red blocks.

How the third diagram should be fixed?

john c. j.
  • 491
  • 3
  • 9
  • Why do you think there *is* a difference between the two? – Jörg W Mittag Jan 03 '20 at 19:30
  • If you want it to be consistent with the others, get rid of the red rectangle and add 'libs'. If it makes sense in this context, you could add a 'heap' block. Based on what I see here, I think the big distinction you are making is that there's no 'OS' inside a JVM. It's tightly coupled to the host OS. – JimmyJames Jan 03 '20 at 19:38

1 Answers1

6

It's fine as is, if you think about it the right way.

You can think of a Virtual Machine as a task running on the hypervisor. They get context switched nearly the same way after all. Tasks and Apps aren't the same thing. Tasks only exist when they're running. Apps exist even after you've terminated their running tasks. They sit around waiting for you to start them again.

Here's a little example.

enter image description here

The issue is that apps and tasks get the same names so, yeah, it can be confusing. Especially when the other images in your question aren't following that same pattern. A normal host OS knows the name of the apps it's running (and so can give the tasks the same names). However, a hypervisor has no idea the name of the guest OS that's running on it. So it makes up it's own names for it's "tasks": "System VM 1", etc.

candied_orange
  • 102,279
  • 24
  • 197
  • 315
  • I really like your answer. Instead of trying to introduce workaround terminology, you provide a deeper understanding of what is going on. – john c. j. Jan 03 '20 at 21:11
  • One simple question: You wrote -- Unlike a normal host OS that knows the name of the apps it's running (and so can name the tasks the same way) a hypervisor has no idea the name of the guest OS that's running on it. So it makes up it's own names for it's "tasks". -- As I understand, under "its own names" you mean "System VM 1", "System VM 2", "System VM 3", right? – john c. j. Jan 03 '20 at 21:12
  • @johnc.j. better? – candied_orange Jan 03 '20 at 21:13
  • Yes, thanks a lot, very clear :-) – john c. j. Jan 03 '20 at 21:17
  • _"Tasks and Apps aren't the same thing. Tasks only exist when they're running. Apps exist even after you've terminated their running tasks. They sit around waiting for you to start them again."_ – Does it mean that a hypervisor, if we think about it as an app, is a virtual machine as well? – user90726 May 17 '21 at 16:13