Differences between Hosted Kernels and Virtual Machines [closed]
Asked Answered
M

1

7

I have been reading about AROS, especially the hosted version. AROS says the following.

kernel.resource contains AROS microkernel. It's the lowest level component,
which is responsible for handling CPU and motherboard. For
hosted ports kernel.resource contains a virtual machine.

From what I have read about virtual machines is that there are 2 types system virtual machines and process virtual machines. I know that AROS is not a system virtual machine, but all the process virtual machines seam to be like Java JVM, Mono, Python, Ruby, etc. They all seam to be language specific. Where as AROS seams to be a complete system/platform running in user mode kind of like User Mode Linux.

AROS-hosted: An Operating System in an Operating System?

AROS is originally developed on Linux running on an Intel-based computer. It runs on many more machines and operating systems, though. This may sound strange: an OS running on top of an other OS, that's emulation, right?

A nice term for what AROS-hosted does is "API emulation". API is a three-letter acronym for Application Programmer's Interface. In plain English: an API provides (C Language) functions that a programmer can use. The AmigaOS API consists of a load of library calls that an Amiga programmer can use to make an Amiga program. AROS emulates the AmigaOS API: it tries to provide the same library calls as AmigaOS. An Amiga emulator, such as UAE; emulates the Amiga computer: the processor, the connected hardware, everything. This has its advantages, like being able to play binary Amiga games on different hardware, and its disadvantages, like not being able to use the emulator as a "real" OS, on a "real" processor. AROS-hosted runs on the "real" processor. But it isn't a "real" OS, unless you run in such a way that it doesn't require Linux. This is called "native" AROS.

AROS can run natively on the Intel and Amiga computers, but not quite as well as it runs on Linux. AROS library functions are made to run under Linux first, internally using Linux kernel and library calls. This way a programmer has the opportunity to bother about the implementation of the whole system first, and to bother about the technical details in a later stadium. People are currently working on making the "native" AROS more usable. The results are very impressive and it is perfectly possible to use AROS-native as a real (and only) Operating system on an IBM PC compatible machine.

Of course, AROS is not only an API emulator. It also tries to provide replacements to all the AmigaOS 3.1 system software, and you will also find a few demo's and games being shipped with AROS, just to show that they work - we might just be at 77% of the whole system, but we already have Quake running!

From this information it seams to me that AROS kernel.resource when used as a virtual machine simply wraps the Linux kernel's system call interface? or am I missing something

In addition are there any other systems like AROS?

I'm wanting to make something like this that would be hosted on many OSes.

Maxma answered 5/11, 2012 at 5:57 Comment(0)
T
0

(note to editors: this question asks for an opinion, and because I am opinionated...):

The classifications of kernel architectures is not as rigorous as say species or even hair colour. Terms like (micro|monolithic|virtual)kernel are more vague descriptions than taxonomic partitions. This helps sell beer to argumentative geeks.

All kernels present some sort of virtual machine. In UNIX, it is typically the user-mode instruction set + the interpretation of a set of system calls to perform various operations + some number of cpus as threads. This abstract machine may enforce other rules, such as the placement and extent of types of memory (stack, heap, text). In a virtualized kernel, it is typically the entire instruction set, a set of cpus, memory, and devices. In most cases, access to memory is arbitrated by the virtualized kernel (common: hypervisor), the devices are implemented within the hypervisor by interpreting accesses to it, and the system-instructions are emulated by the hypervisor.

But both of these (UNIX, hypervisor) present virtual machines, just with different abstractions. The UNIX virtual machine might have a notion of priority, whereby a process establishes that it should be more or less favoured for cpu or memory resources; whereas a pure virtual computer (hypervisor) would have no way to communicate such a notion.

Regardless of the environment, within my unit of execution (process, vm), I might choose to enact my own runtime notions of threads, processes, devices and interactions. The gvisor project provides a quite complete implementation of this concept, but even the golang runtime divorces the golang programs from the underlying kernel. This is quite a foreign concept to C programmers who tend to view the kernel as more of a privileged shared library.

So, yes, you can run kernels under kernels until your hearts desire is met. Fun with linux, if you google around you can sort out how to construct a container which uses qemu-* as a loader so your partition can run an arm bash on an x86 machine and seamlessly run arm & x86 binaries. Your friends will make fun of you when you show them this.

actual questions:

.. or am I missing something ..? AROS can nest itself within a Linux environment where it doesn’t leak the Linux environment to its guests. Running a kernel in this mode is typically called hosted. See gvisor for an example of how air-tight you can make this, without even becoming root.

Are there any other systems like AROS? Countless.

Terriss answered 8/3, 2019 at 14:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.