News for hackers. Stuff that matters.
Re:Building a Minimalistic Virtual Machine by narag on Saturday February 25, 2023 @04:14PM (#34940563)
Very interesting for embedded or kiosk. Or in general, if the VM is run as a server inside a host: encryption in a box, instead of a library. Curious about what kind of multitask will be added.
Re:Building a Minimalistic Virtual Machine by maxime_cb on Saturday February 25, 2023 @04:33PM (#34940699)
I could actually use some feedback when it comes to the design of the parallelism model for UVM. I have a few ideas but it's not my area of expertise, so I would welcome feedback and suggestions.
Re:Building a Minimalistic Virtual Machine by narag on Saturday February 25, 2023 @04:42PM (#34940763)
I have experience as a user, implementation is way over my head. Depending on the minimum host supported, you could only use lightweight threads or write a scheduler. IIRC, JVM started using its own thread implementation and later used the one provided by the host OS, when available.

Best of luck!

Re:Building a Minimalistic Virtual Machine by maxime_cb on Saturday February 25, 2023 @05:04PM (#34940912)
At the moment I have an event-driven system where you can set up callbacks and timers. It's not green threads but it makes it easy to have multiple different update events running at different rates, for example: https://github.com/maximecb/uvm/blob/main/ncc/examples/attac...
Re:Building a Minimalistic Virtual Machine by chc4 on Saturday February 25, 2023 @05:51PM (#34941279)
For parallelism I'd expect something like Cilk (or Rayon, which was inspired by it), where there's some syscalls for spawning and then joining on tasks, but the VM handles starting and managing the thread pool.

For concurrency it's a lot harder to make a good interface

Re:Building a Minimalistic Virtual Machine by maxime_cb on Saturday February 25, 2023 @06:52PM (#34941670)
> For concurrency it's a lot harder to make a good interface

Can you elaborate?