r/osdevel

What do you think about this command prompt app design for my os
▲ 16 r/osdevel+1 crossposts

What do you think about this command prompt app design for my os

I’ve live streamed the making of it, so I dare anyone to say it’s AI ;) haha

Here is the link : https://twitch.tv/devcmar
Though the output does not probably show up on the livestream because it is running in another tty

u/devcmar — 3 days ago
▲ 18 r/osdevel+2 crossposts

Submit your projects to be shown off in my weekly OSDev newsletter (RSS + website exists)

I decided to start a small news site dedicated to stories about OSDev published every friday, starting next week. Please submit your projects!
SUBMIT: https://forms.gle/7ZRNJ9RGSjnp3rx5A
RSS: https://news.thatosdeveloper.us/feed.xml
Website: https://news.thatosdeveloper.us

NOTE: The base site is still being revamped as its based on an old jekyll theme and of course many things are subject to change. Also for now comments use Disqus though this may be changed at some point in time.

EDIT: Though a mailing list will be setup to send out emails every Sunday at 0900 (9AM). And posts will happen at least once a week though more may happen over time.

u/TheNullDeref — 3 days ago
▲ 20 r/osdevel+1 crossposts

Simple file viewer in my os with blur behind window (0% AI)

There are some bugs that I should fix, like caching a file entry twice and some latency probably caused by low thread priority but here is the progress whatsoever, hope you do well :)

u/devcmar — 6 days ago

how are you testing?

I'm not sure I've seen a hobby OS project that implements any tests. Most people smoke test, so they know there's a problem if they start up the OS and can't run an app inside it.

But what about the more complicated code paths that can go wrong? If a multi-threaded race happens in memory management or I/O, the system can crash. Or worse: silently corrupt data.

What about performance? Does anyone test for throughput or latency, and then identify regressions or hot spots?

reddit.com
u/mikeblas — 4 days ago
▲ 30 r/osdevel+1 crossposts

I will be streaming my Os Dev journey without using any AI

here is the twitch account, hope you do well:

https://www.twitch.tv/devcmar

I'm going to create the CPU rendered compositor in front of you, with absolutely no AI usage and everything is recorded on live with replay included. hope things go well,

I hope you do well.

Please be supportive, and please do not stone me in the comments !

u/devcmar — 5 days ago

Amos2 progress

What you see here is initialization boot messages. IdleTask is spawned and it spawns FSTask.

FSTask prints the two directory listings from a FAT32 formatted volume.

AMOS2 is currently a microkernel design with a single address space.

No AI assist of any kind used. It's all my work, unless indicated in comments - I am using someone else's sprintf implementation for now.

REPO LINK: https://codeberg.org/mschwartz/amos2

PROJECT BOARD LINK: https://codeberg.org/mschwartz/amos2/projects/62870

NOTES:

**Threading implementation:**

* MMU is not being used. Currently the identity mapping set up by limine is used.

* Tasks(threads) are kept in a running tasks doubly linked list. The list is sorted by priority. So remove the head and add back sorted effects round robin task switching at the same priority. Lower level priority tasks won't run until all higher priority tasks exit or are blocking.

* SpinLock is used around accessing the threads lists.

* Tasks have their own stack. Task state is pushed on this stack in ISR handlers.

* Task switch is as simple as changing the RSP register to the next Task's stack.

NOT IMPLEMENTED YET:

* blocking Tasks list

* Device tasks (to implement blocking I/O)

* Kill/exit Tasks

u/mykesx — 6 days ago
▲ 16 r/osdevel+2 crossposts

Robu_microkernel project

I've been working on a microkernel called Robu and thought I'd finally share it here.

It's written from scratch in C and assembly, and the main thing I'm interested in is seeing how far I can take the microkernel approach without letting IPC and context switching become painfully expensive.

A lot of the design is inspired by the L4 family, especially things like synchronous IPC, register-based messages, timeslice donation and lazy scheduling.

The kernel is meant to stay pretty small, with things like drivers, filesystems, networking and paging living outside of it in userspace.

Right now I'm mainly working on x86_64, although I want to support ARM and RISC-V as well.

There's still a lot to do, but the basic pieces are starting to come together. I'm putting it out here mainly to get some feedback from people who are into OS development and microkernels.

GitHub: https://github.com/bayar17/robu_microkernel

reddit.com
u/seenhokage — 9 days ago
▲ 15 r/osdevel

What do you think of this icon for the community?

The r/osdevel logo combines the >_ terminal prompt with concentric CPU privilege rings, representing the interaction between developers and the low-level systems they build. The terminal symbol keeps the design immediately recognizable as a computing/development community while the rings give it a specifically OS-development meaning.

u/Vegetable_Exam_6865 — 10 days ago

What do you guys think of this new logo we're planning to use? If the majority says no, we won't adopt it.

u/Vegetable_Exam_6865 — 13 days ago
▲ 40 r/osdevel+1 crossposts

finished rewriting a lot of the BoredOS netstack

Hey reddit!

I've spent the last few weeks rewriting the network stack for my hobby OS, BoredOS.

Before i start yapping about what i changed, i'll quickly explain the netstack. BoredOS uses the lwIP stack to handle IPv4, Ipv6 (experimental), TCP, UDP and ICMP. The nice thing about LwIP is that i only have to supply hardware driver ring buffers, VFS fd's, some splinlock synchro, socket wait queues and a few syscalls.

Previously i was using a custom sysfs file interface to handle network traffic.. Which was quite shit imo. It didn't fit standard C lib calls or allow multiplexing network I/O alongside regular files. I replaced this monstrosity with a BSD socket layer and standard POSIX system calls like: socket, bind, connect, listen, accept, send, recv, select, poll, sendmsg, and recvmsg. Wiring sockets directly into the VFS fd table allows read/write and close to work on net sockets the same way they do on regular files and pipes.

BoredOS previously also had DHCP and DNS baked into the kernel with some very messy way of interacting with them, these have now all been moved into userspace with my own versions of standard fbsd netutils.

For packet handling, i moved processing out of the hardware interrupt handlers into a dedicated kernel worker thread. Processing packets directly in interrupt context was increasing interrupt latency and causing frame drops in heavy bursts, therefore hardware ISRs now just dump incoming frames into ring buffers and wake up a dedicated kernel worker thread via a wait queue. The worker thread sleeps when idle, wakes up on IRQs to drain the buffers into lwIP, and manages background timers for TCP retransmissions and ARP timeouts. For socket storage, i added kernel ring buffers backed by spinlocks and wait queues to handle blocking and non-blocking backpressure properly.

To allow my netutils and custom protocols to run without needing to ensloppify the kernel, i wrote a virtual TUN and TAP device driver. It supports layer 3 IP tunneling feeding into lwIP and Layer 2 Eth frame mode through TUNSETIFF ioctls. I also added raw socket support with AF_PACKET so userland packet sniffers can capture and inject raw ethernet frames directly. Of course meant for the skids to larp that they're hacking something xD.

For device management i added BSD style interface naming like em0 for intel gigabit cards, re0 and re1 for RealTek cards, vtnet0 for VirtIO, and tun0 for virtual devices.

With all these changes i also managed to speed up the stack by a LOT. Previously i was limited to a few Mbit/s and i am now able to push 800 Mbit/s in QEMU emulating an E1000 nic (maybe VirtIO is even faster? too lazy to test though) which basically maxes out the host machine connection.

EDIT:
Forgot to attach the gh:
https://github.com/BoredOS

u/christiaansp — 13 days ago

Windows and Linux memory usage -- what about your OS?

Here's an LTT video comparing memory usage on Windows and Linux.

Linus' credibility is taking lots of hits (did he buy actually that private jet?) and this video sure won't help. I had hoped for something interesting and technical, and it's really just two guys screwing around with computers and looking at graphs that they don't fully understand. Worth a watch for a laugh.

In your OS, what memory allocation strategy did you devise? Are you just making a simple on-demand allocator, or do you reserve and commit pages? Do you have paging implemented? What algorithms did you use for page eviction?

u/mikeblas — 12 days ago