!LTlGQyELVALdvpwHob:matrix.org

Redox OS/General

507 Members
General chat for Redox OS51 Servers

Load older messages


SenderMessageTime
18 Apr 2024
@4ldo2:matrix.org4lDO2
In reply to @binarycat:snug.moe
does redox have a kernel io cache?
Not the kernel, some drivers do though.
07:44:27
@binarycat:snug.moeネコhuh07:46:53
@binarycat:snug.moeネコhow do you implement an io cache outside the kernel?07:47:27
@binarycat:snug.moeネコsince you need to drop it when under memory pressure 07:47:57
@4ldo2:matrix.org4lDO2Right now, it doesn't. But the kernel will eventually implement swap, in which case it could send deallocation requests to drivers (whose pages would be memlocked), and if a driver is uncooperative or not responding, invoke the oom killer.07:59:58
@4ldo2:matrix.org4lDO2It could for example count various classes of (present) pages in each address space, such as "cache"/"regular cow"/"regular shared"/"pinned", in which case it would know what to prioritize first.08:05:14
@4ldo2:matrix.org4lDO2 * Right now, it doesn't. But the kernel will eventually implement swap, in which case it could send deallocation requests to drivers (whose cache pages would be "memlocked"), and if a driver is uncooperative or not responding, invoke the oom killer.09:07:53
@4ldo2:matrix.org4lDO2 * The kernel could for example count various classes of (present) pages in each address space, such as "cache"/"regular cow"/"regular shared"/"pinned", in which case it would know what to prioritize first.12:14:25
@tijlleenders:matrix.org~Tijl

So ... I've been studying up on (micro)kernels and OSes. There's one thing I can't quite grasp:

  • In what ways is Redox significantly different from Minix / SL4?
    Are there any significant departures - or is it basically a rewrite in Rust. I could go through the 30,000 lines of code in Redox compared to the 6,000/9,000 LOCs of Minix/SEL4 to figure out the differences ... but maybe someone can put me on the right track?
15:39:42
@rw_van:matrix.orgrw_vanWe don't have a specific list. It's "inspired by", not copied from, seL4 and Minix. There are several things that were moved into the kernel for performance reasons, that could be moved out as we continue optimizing. (Optimizing critical functions makes it less necessary to have e.g. various housekeeping functions in the kernel)15:47:12
@draft_isa:matrix.orgRibbonBoth Minix and seL4 don't have a Plan 9-like system interface.15:55:45
@draft_isa:matrix.orgRibbonI think it's the main difference.15:56:00
@tijlleenders:matrix.org~TijlThanks, to be clear: I'm not judging ... just curious. I love this approach of letting badly written drivers crash and burn without impacting the kernel.15:57:39
@tijlleenders:matrix.org~Tijl... next to other advantages like live update15:58:05
@tijlleenders:matrix.org~Tijl Ribbon: So Redox follows a Plan 9-like interface?
Also, does Redox have kernel threads. I feels like Andrew Tanenbaum would've included that if he were to do Minix all over - from some of his comments.
16:25:48
@draft_isa:matrix.orgRibbon
In reply to @tijlleenders:matrix.org
Ribbon: So Redox follows a Plan 9-like interface?
Also, does Redox have kernel threads. I feels like Andrew Tanenbaum would've included that if he were to do Minix all over - from some of his comments.
Yes, the "schemes"
16:26:26
@tijlleenders:matrix.org~TijlAh yes of course! ... and kernel threads are supported?16:39:53
@4ldo2:matrix.org4lDO2Yes, there are kernel threads, but it has been proposed that the kernel be restructured as an "event kernel" (for performance), i.e. only one stack per hardware thread (https://gitlab.redox-os.org/redox-os/kernel/-/issues/112).16:58:30
@4ldo2:matrix.org4lDO2(which userspace won't notice, other than memory usage being lower per thread)16:59:29
@4ldo2:matrix.org4lDO2Currently, the kernel threads are called "contexts", almost all of which are userspace. The only exception is one kmain context per cpu.17:01:47
@draft_isa:matrix.orgRibbon
In reply to @4ldo2:matrix.org
Yes, there are kernel threads, but it has been proposed that the kernel be restructured as an "event kernel" (for performance), i.e. only one stack per hardware thread (https://gitlab.redox-os.org/redox-os/kernel/-/issues/112).
The link is broken?
17:03:11
@4ldo2:matrix.org4lDO2
In reply to @draft_isa:matrix.org
The link is broken?
not for me
17:03:35
@4ldo2:matrix.org4lDO2 * Currently, the kernel threads are called "contexts", almost all of which primarily run userspace except during interrupt handlers or syscalls. The only exception is one kmain context per cpu. 17:06:52
@4ldo2:matrix.org4lDO2
In reply to @tijlleenders:matrix.org

So ... I've been studying up on (micro)kernels and OSes. There's one thing I can't quite grasp:

  • In what ways is Redox significantly different from Minix / SL4?
    Are there any significant departures - or is it basically a rewrite in Rust. I could go through the 30,000 lines of code in Redox compared to the 6,000/9,000 LOCs of Minix/SEL4 to figure out the differences ... but maybe someone can put me on the right track?
I haven't looked that deeply into minix, but compared to seL4, Redox has a slightly more complex and indirect capability system (in order to implement POSIX file descriptors without overhead). The kernel is also stack-based rather than event-based, and implements memory management and process management (the latter will likely be moved to userspace) which sel4 implements in userspace.
17:16:59
@4ldo2:matrix.org4lDO2
In reply to @tijlleenders:matrix.org

So ... I've been studying up on (micro)kernels and OSes. There's one thing I can't quite grasp:

  • In what ways is Redox significantly different from Minix / SL4?
    Are there any significant departures - or is it basically a rewrite in Rust. I could go through the 30,000 lines of code in Redox compared to the 6,000/9,000 LOCs of Minix/SEL4 to figure out the differences ... but maybe someone can put me on the right track?
* I haven't looked that deeply into minix, but compared to seL4, Redox has a slightly more complex and indirect capability system (in order to implement POSIX file descriptors without overhead). The kernel is also stack-based rather than event-based, and implements memory management and process management (the latter will likely be moved to userspace) which sel4 expects userspace to implement.
17:17:40
@4ldo2:matrix.org4lDO2 * I haven't looked that deeply into minix, but compared to seL4, Redox has a slightly more complex and indirect capability system (in order to implement POSIX file descriptors without overhead). The kernel is also s(currently) tack-based rather than event-based, and implements memory management and process management (the latter will likely be moved to userspace) which sel4 expects userspace to implement. 17:20:04
@4ldo2:matrix.org4lDO2 * I haven't looked that deeply into minix, but compared to seL4, Redox has a slightly more complex and indirect capability system (in order to implement POSIX file descriptors without overhead). The kernel is also (currently) stack-based rather than event-based, and implements memory management and process management (the latter will likely be moved to userspace) which sel4 expects userspace to implement. 17:20:14
@tijlleenders:matrix.org~TijlThanks people, I'll dive into the code when I have time. Maybe I can make some PRs on the documentation 🤔. I s the MMU is a good place to start ... or capabilities? 17:24:29
@draft_isa:matrix.orgRibbon
In reply to @tijlleenders:matrix.org

Thanks people, I'll dive into the code when I have time.
Maybe I can make some PRs on the documentation 🤔.

I s the MMU is a good place to start ... or capabilities?

It's a grey area because we are implementing things and changing the design where needed.
17:26:47
@tijlleenders:matrix.org~TijlOk I'll tread lightly and ask before going all out... Don't have much time to spare - but I see huge potential and would love to help in any way I can.17:29:27

There are no newer messages yet.


Back to Room ListRoom Version: 9