OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 9:50 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How is hardware supposed to be multiplexed in a exokernel?
PostPosted: Mon Feb 20, 2023 2:00 am 
Offline

Joined: Fri Feb 03, 2023 4:53 am
Posts: 9
As far as I understand exokernels, applications are compiled with libos-es (which are "just another library" statically linked to the application). Like this

Code:
app       app
-----    -----
libos    libos
==============
    kernel


libos-es do not communicate between them, so they are not like servers in a microkernel.
What I don't understand is how the kernel is supposed to multiplex the hardware when there are many libos-es running. For example let's take the example of memory-mapped devices. The drivers would be included in each libos (right?), and all the libos-es can write to the memory-mapped registers. Isn't this chaos? What's the kernel doing to avoid chaos?


Last edited by exo on Tue Feb 21, 2023 12:34 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How is hardware supposed to be multiplexed in a exokerne
PostPosted: Mon Feb 20, 2023 6:20 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
The diagram you've got there shows a monolithic exokernel. The kernel can securely multiplex hardware because there are drivers in the kernel, like any other monolithic kernel.


Top
 Profile  
 
 Post subject: Re: How is hardware supposed to be multiplexed in a exokerne
PostPosted: Tue Feb 21, 2023 12:40 am 
Offline

Joined: Fri Feb 03, 2023 4:53 am
Posts: 9
Octocontrabass wrote:
The diagram you've got there shows a monolithic exokernel. The kernel can securely multiplex hardware because there are drivers in the kernel, like any other monolithic kernel.


Sorry what does it mean "monolithic exokernel" and what would a "non-monolithic" exokernel look like?
I thought "exo" was like the opposite of "monolithic" and as such everything was *outside* the kernel, including the drivers.


Top
 Profile  
 
 Post subject: Re: How is hardware supposed to be multiplexed in a exokerne
PostPosted: Tue Feb 21, 2023 12:53 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
exo wrote:
Sorry what does it mean "monolithic exokernel" and what would a "non-monolithic" exokernel look like?

A monolithic exokernel is one that contains the necessary drivers for securely multiplexing hardware. A non-monolithic exokernel runs drivers in userspace, requiring the libOS to communicate with those drivers for access to hardware rather than the kernel itself.

exo wrote:
I thought "exo" was like the opposite of "monolithic" and as such everything was *outside* the kernel, including the drivers.

The traditional exokernel moves everything except drivers outside the kernel, so it's not really the opposite of a monolithic kernel.


Top
 Profile  
 
 Post subject: Re: How is hardware supposed to be multiplexed in a exokerne
PostPosted: Tue Feb 21, 2023 11:40 pm 
Offline

Joined: Fri Feb 03, 2023 4:53 am
Posts: 9
Octocontrabass wrote:
A non-monolithic exokernel runs drivers in userspace, requiring the libOS to communicate with those drivers for access to hardware rather than the kernel itself


Basically, the moment libos-es "require to communicate" I'm building a microkernel and not an exokernel anymore. Isn't it?

Octocontrabass wrote:
drivers


out of curiosity, is it actually possible to have multiple drivers controlling the same device? Or there must be one and only one driver active at every time?


Top
 Profile  
 
 Post subject: Re: How is hardware supposed to be multiplexed in a exokerne
PostPosted: Wed Feb 22, 2023 11:24 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
exo wrote:
Basically, the moment libos-es "require to communicate" I'm building a microkernel and not an exokernel anymore. Isn't it?

Your OS can be both a microkernel and an exokernel at the same time.

exo wrote:
out of curiosity, is it actually possible to have multiple drivers controlling the same device? Or there must be one and only one driver active at every time?

Most devices are designed to be controlled by only one driver, and allowing multiple drivers would require insecure cooperation between drivers. However, some devices provide virtual functions that are meant to be controlled by separate drivers so that a hypervisor can map each function to a different virtual machine. You can use those virtual functions to allow separate drivers to share the hardware.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group