Are there any good books, Ebooks, or tutorials for learning how to code a platform virtual machine?
I've checked the Wiki site and there is no information on there about virtual machines.
I'm trying to make my virtual CPU platform, so I'm looking for some books to asist me.
Thanks in advance
Books for learning to program a platfiorm virtual machine
- zeitue
- Member
- Posts: 88
- Joined: Fri Dec 14, 2012 6:05 pm
- Libera.chat IRC: zeitue
- Location: United States, Texas
- Contact:
Books for learning to program a platfiorm virtual machine
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Books for learning to program a platfiorm virtual machin
An emulator is just an implementation of a well specified but severely intricate specification. You need little more than all the basic programming rules for a complex system to pull off this job.
Re: Books for learning to program a platfiorm virtual machin
But a virtual machine is not necessarily an emulator of an existing CPU. The Java VM, the .NET framework, SmallTalk VMs all implement hypothetical processors.
Anything describing the internals of those examples would probably help; alternatively study the manuals for various processors, or any general books about computer architecture, to discover what facilities you might want to implement in your hypothetical one.
Anything describing the internals of those examples would probably help; alternatively study the manuals for various processors, or any general books about computer architecture, to discover what facilities you might want to implement in your hypothetical one.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Books for learning to program a platfiorm virtual machin
Slightly offtopic, but probably relevant for the bigger picture: upcoming lecture on the subject - Should get recorded, maybe even livestreamed.
- zeitue
- Member
- Posts: 88
- Joined: Fri Dec 14, 2012 6:05 pm
- Libera.chat IRC: zeitue
- Location: United States, Texas
- Contact:
Re: Books for learning to program a platfiorm virtual machin
I managed to write a simple 4 register virtual machine but I was hoping you more information on things like CPU, I/O devices, FPU?, Memory coding for the VM.Combuster wrote:An emulator is just an implementation of a well specified but severely intricate specification. You need little more than all the basic programming rules for a complex system to pull off this job.
I assume that virtual machines are a lot different from my work on operating systems.
I was also wondering things like if I should map my virtual registers to the host's registers?
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
Re: Books for learning to program a platfiorm virtual machin
Virtual machines have essentially 3 options:
- Hardware virtualization
- Software virtualization
- Emulation
Both hardware and software virtualization run native code, thus they require the guest and host architecture to be compatible. With the tools that have been provided by amd and intel, x86 software virtualization doesn't really make sense anymore. That being said, I think what you are looking for is information on emulators.
I actually recently read a decent write-up on high level emulator design. The first answer in this thread: http://stackoverflow.com/questions/4486 ... ey-written has some good information.
Emulator optimization techniques vary greatly depending on your approach. Essentially, you are looking for more information on either interpreting or recompiling.
In my opinion, writing an effective interpreting emulator would start with understanding the pipeline of the guest OS and coming up with a design that will simulate that pipeline the best. You will probably end up with a block diagram similar to doing a google image search for intel or amd processors with named architectures.
- Hardware virtualization
- Software virtualization
- Emulation
Both hardware and software virtualization run native code, thus they require the guest and host architecture to be compatible. With the tools that have been provided by amd and intel, x86 software virtualization doesn't really make sense anymore. That being said, I think what you are looking for is information on emulators.
I actually recently read a decent write-up on high level emulator design. The first answer in this thread: http://stackoverflow.com/questions/4486 ... ey-written has some good information.
Emulator optimization techniques vary greatly depending on your approach. Essentially, you are looking for more information on either interpreting or recompiling.
In my opinion, writing an effective interpreting emulator would start with understanding the pipeline of the guest OS and coming up with a design that will simulate that pipeline the best. You will probably end up with a block diagram similar to doing a google image search for intel or amd processors with named architectures.
- zeitue
- Member
- Posts: 88
- Joined: Fri Dec 14, 2012 6:05 pm
- Libera.chat IRC: zeitue
- Location: United States, Texas
- Contact:
Re: Books for learning to program a platfiorm virtual machin
I think really what I'm looking for is emulation, perhaps JIT as well. I'm intending to make my own virtual CPU architecture.Rew wrote:Virtual machines have essentially 3 options:
- Hardware virtualization
- Software virtualization
- Emulation
Both hardware and software virtualization run native code, thus they require the guest and host architecture to be compatible. With the tools that have been provided by amd and intel, x86 software virtualization doesn't really make sense anymore. That being said, I think what you are looking for is information on emulators.
I actually recently read a decent write-up on high level emulator design. The first answer in this thread: http://stackoverflow.com/questions/4486 ... ey-written has some good information.
Emulator optimization techniques vary greatly depending on your approach. Essentially, you are looking for more information on either interpreting or recompiling.
In my opinion, writing an effective interpreting emulator would start with understanding the pipeline of the guest OS and coming up with a design that will simulate that pipeline the best. You will probably end up with a block diagram similar to doing a google image search for intel or amd processors with named architectures.
Thanks for the reply and the information if this was Stackoverflow I'd upvote that.
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen