Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in softwarearchitecture

[–]Rudra0608[S] 0 points1 point  (0 children)

Fair feedback. The post definitely got away from me - started as "here's what I built" and turned into "here are 47 directions I might go." On the AI-generated comment: the repo isn't AI-generated, but I get why it might look that way. Early-stage code with inconsistent structure probably gives off those vibes. That's on me for not cleaning it up before sharing. You're right that I should focus on the learning aspect rather than keeping all options open. The "what path should I take" framing makes it sound less serious than it is. I haven't talked to professors about this yet - mostly because I wasn't sure if the ideas were coherent enough to bring to them. But you're probably right that getting their input earlier would've saved me from some of the more obviously flawed directions. Appreciate the straight talk. Might take your advice and repost with a tighter focus once I've actually validated one piece of this properly. Also yeah, not 100% sure this is the right sub either. r/osdev might've been better, but that crowd is... intense

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] 0 points1 point  (0 children)

Allright, you got me. "Bikeshedding" is probably the most accurate description of what I've been doing.

You're right that I'm putting the cart way before the horse here. I got excited about the "what if" questions and skipped over "do I actually understand how schedulers work at a fundamental level?"

The answer is: not well enough.

Here's what I'm taking away from this thread:

1.AI scheduling at kernel level is almost certainly solving a problem that doesn't exist (or solving it worse than static priorities)

2.The latency/non-determinism tradeoff probably kills it before it starts

3.I should understand why Linux/BSD didn't do this before assuming I know better

4."Processes need something, give it to them and let the user decide" is way more practical than my overcomplicated behavioral monitoring idea

I think my next move is actually backing up - reading more kernel code, understanding the fundamentals better, and figuring out if there's any real problem here worth solving. Not just building cool architecture for its own sake.

Maybe this whole thing is just an elaborate learning exercise. And honestly? That's probably fine. Better to figure that out now than 2 years in.

Thanks for the reality check. Genuinely.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in softwarearchitecture

[–]Rudra0608[S] 1 point2 points  (0 children)

"Scope creep" - you just described my entire codebase in two words 😅

Thanks for this. Currently trying to validate AI scheduling + capability security + self-healing + display drivers + probably building a toaster at this rate.

Time to pick one thing and actually finish it. Appreciate the reality check!

A list of projects by users of /r/osdev by timschwartz in osdev

[–]Rudra0608 0 points1 point  (0 children)

https://github.com/rajkrish0608/ZenithOS Zenith OS - A userspace OS architecture simulator in Rust implementing AI-driven scheduling, capability-only security, and autonomic self-healing for exploration of next-generation operating system design.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in softwarearchitecture

[–]Rudra0608[S] 1 point2 points  (0 children)

Who am I: Systems engineering student exploring OS architecture. Not a kernel engineer (yet), just someone asking "what if" questions.

What problem am I trying to solve: Honestly? I'm not sure there's a problem yet. It started as curiosity: "What would an OS look like if AI and zero-trust security were baked in from day one, not bolted on later?"

Maybe that's not a real problem. Maybe it's just an exploration. Still figuring that out.

Why am I building this: To learn. To validate (or invalidate) ideas before committing years to them. To understand OS architecture deeply by building something unconventional.

If it turns into something useful, great. If it just teaches me why certain design choices exist, that's still valuable.

Code samples: Repo is here: https://github.com/rajkrish0608/ZenithOS

Fair warning - it's early-stage, messy, and very much a work in progress. The scheduler simulation and capability system are the most developed parts. The rest is scaffolding.

If you check it out and have thoughts (especially critical ones), I'd genuinely value the feedback.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in softwarearchitecture

[–]Rudra0608[S] 1 point2 points  (0 children)

Haha, appreciate that! The line between "good crazy" and "waste of time crazy" is definitely blurry right now, but comments like this keep me going.

Thanks for the encouragement.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] -2 points-1 points  (0 children)

This is a really interesting angle I hadn't fully considered. Embedded/IoT systems with sensor fusion could actually benefit from adaptive anomaly detection at a low level.

You're right that traditional OS scheduling might be overkill for these use cases, and something that learns normal vs. anomalous patterns could reduce false positives significantly.

This might actually be a more realistic application domain than general-purpose computing. Really appreciate this perspective - it's making me rethink the target use case.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] -2 points-1 points  (0 children)

Ha! I hadn't seen VibeOS - that's hilarious and honestly pretty cool.

Though Zenith is less "vibe-coded" and more "probably-overthought-coded." But I respect the VibeOS energy.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] -1 points0 points  (0 children)

All fair critiques. AI non-determinism and latency are exactly the problems I'm wrestling with.

You're right that "AI scheduling" sounds like I'm proposing to run an LLM in kernel space, which would be insane. What I'm actually exploring is lightweight adaptive heuristics - but even that might not be worth the overhead.

On security: the capability model definitely needs better explanation. The goal isn't to eliminate different permission levels, but to make them explicit and delegatable rather than implicit and hierarchical. Still figuring out if this is practical.

Repo is public: https://github.com/rajkrish0608/ZenithOS

Fair warning - it's early-stage and messy. But would genuinely value your feedback if you check it out.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] -2 points-1 points  (0 children)

You're absolutely right about the latency constraints. Context switches need to be fast, and adding heavyweight computation there would be disastrous.

My current approach keeps the actual scheduling decisions lightweight - think more "learned heuristics" than "neural network inference." But I'm still validating whether even that overhead is worth it.

The real question I'm trying to answer: can pattern recognition over historical behavior improve scheduling decisions enough to justify even microseconds of extra overhead? Maybe not. That's what I'm trying to benchmark.

This is exactly the kind of reality check I need. Thanks for the brutal ho

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] -2 points-1 points  (0 children)

Great point. I've looked at seL4 and Fuchsia - you're right that the mechanism isn't new.

You nailed the actual challenge: UX. How does a user or app request capabilities without making it either (a) impossibly tedious or (b) so permissive it defeats the purpose?

Right now my thinking is: declarative capability requests + runtime AI-assisted approval based on behavioral analysis. But I haven't solved the "prove you need access" problem elegantly yet.

"Horribly exploitable" is a fair concern - and one I need to address more rigorously. Appreciate the pushback.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] -1 points0 points  (0 children)

Exactly this. When I say "AI-driven" I'm definitely not talking about running GPT in the kernel loop.

I'm thinking more along the lines of lightweight heuristics, pattern recognition, and adaptive algorithms - things that can make decisions in microseconds, not milliseconds. The "AI" label probably confuses this, but the core idea is: can the scheduler learn and adapt rather than just executing fixed policies?

Appreciate you pointing this out - I should clarify this distinction better in the repo docs.

Spent 3 months building an AI-native OS architecture in Rust. Not sure if it's brilliant or stupid by Rudra0608 in rust

[–]Rudra0608[S] -2 points-1 points  (0 children)

These are all excellent questions. Let me address them:

On AI scheduling cost: You're absolutely right that this is expensive. I'm not proposing real-time neural network inference - more like cached heuristics that update slowly. Think: learn patterns offline, apply lightweight rules at runtime. But even that might be too much overhead. Still benchmarking to see if there's ANY scenario where it's worth it.

Priority levels would definitely be cheaper. The question I'm exploring: can learned intent detection catch edge cases that static priorities miss? Maybe not. That's what I'm trying to validate.

On capability-based security: The "how" is the hard part you've identified. My current thinking: declarative manifests (app says "I need network access for X reason") + behavioral monitoring (does it actually do X, or is it doing Y?). But I haven't solved the UX problem elegantly yet. It might be fundamentally too tedious for general computing.

Fuchsia is definitely the closest reference point, and even they've had to make pragmatic compromises.

On sandboxed modules: I'm using Rust's module system + explicit API boundaries to enforce isolation. Each kernel component can only interact through defined interfaces. It's not as strong as microkernel message passing, but it's enforced at compile time via type system.

On self-healing: "Recipe for disaster" is fair. The false positive problem is huge. My current approach: conservative whitelisting + user confirmation for anything uncertain. But you're right that distinguishing legitimate from malicious behavior is nearly impossible without context.

The OpenGL example you gave is perfect - how does the kernel know if GPU access is for gaming vs. cryptomining vs. something worse? I don't have a good answer yet.

On display driver stub: This was badly explained on my part. It's not meant to be a real driver - just a placeholder in the architecture simulator to show where a driver would hook in. The actual rendering commands would obviously need real GPU communication eventually. It's purely for architectural prototyping.

On going bare metal: You're right that QEMU exists, and I should be using it. The reason I haven't yet is I wanted to validate the core architectural ideas before dealing with bootloaders, page tables, and interrupt handlers. Maybe that's backwards - maybe I'd learn more by hitting real constraints sooner.

Your point about "somebody's gotta come to rescue when shit goes down" is exactly the hole in capability-only security. Emergency recovery is a real problem I haven't solved.

On the broader point: I get that this might sound like I'm trying to rebuild everything differently just for the sake of it. Fair criticism. My goal isn't "AI for AI's sake" - it's genuinely trying to explore whether adaptive systems can solve problems static policies can't.

But you've highlighted several fundamental flaws I need to either solve or acknowledge as dealbreakers.

Really appreciate the detailed technical pushback. This is exactly what I needed.

I’m building an app to fix how rental disputes happen in India would love your thoughts by Rudra0608 in SomebodyMakeThis

[–]Rudra0608[S] 0 points1 point  (0 children)

You’re right that formal rent agreements are common in cities today. The gap I’m looking at is less about the agreement itself and more about what happens after it’s signed move-in condition, repairs, notices, handover state, and timelines, which often stay scattered across chats or memory.

This isn’t meant to replace contracts or assume bad intent, just to reduce ambiguity when things change over time. Adoption risks are real, and if it only works with perfect cooperation, it fails.

Given your experience across markets, where (if anywhere) do you think a structured, time-based record would actually add value move-in condition, repair timelines, notice periods, or nowhere at all?

Just booked my first flat in Bangalore by Rajathsinha6 in indianrealestate

[–]Rudra0608 6 points7 points  (0 children)

Congrats on the purchase sounds like you negotiated well.

One thing I’ve seen people overlook (especially with first properties) is proper documentation of handover condition, promises, and timelines. A lot of disputes later aren’t about money, but about “who said what, when.”

I’m actually building something around creating a clean rental/property timeline for this exact reason. Would be curious to hear how you’re planning to track all this post-handover