#saalty's unnamed OS

1 messages Β· Page 2 of 1

slim edge
#

i don't think the rewrite was that significant

daring citrus
#

think again

bitter echo
#

Windows.UI.Xaml.Phone.dll lol

#

and maps wtf

#

that cant be real

woeful rover
#

the pervious notepad should be much more basic

slim edge
#

ig at least they're making everything consistent :^)

snow cloud
#

INK CONTR... WHA

#

what does that even do?!

still pebble
#

they done put maps in notepad

#

bruh

snow cloud
#

what would that even be useful for?

#

there isn't even a feature in notepad which makes use of it

#

at least apparently

still pebble
snow cloud
#

Maybe Microsoft Word but.. notepad? Really?

still pebble
#

XHCI is now working

#

Here is mouse input data, delta X with delta Y

#

This is a huge update but I havent posted in a while

exotic lintel
still pebble
#

Need to fix some problem with my bootloader now...

#

Getting a page fault

still pebble
#

Fixed! ||Surprised I fixed it faster than getting the limine talk||

still pebble
#

I could implement USB Mass storage devices along with the current HID in order to not require an installed hard drive

#

Yeah I will probably do that

#

Now that I will feed mouse data into usermode, I will repurpose the current keyboard data queue to be a general purpose event queue, with events being mouse, keyboard, etc

#

Actually, instead of an event queue, I could do an event ring buffer

#

So when hardware sends data, it will add an item to the ring buffer and advance a dequeue pointer, and then usermode processes can use a syscall to poll for events and advance the enqueue pointer

still pebble
#

Where is saalty #1 fan 😭

still pebble
#

Now I cleaned up the XHCI driver and I now have it pass HID data to the user mode processes cleanly

#

Now I am trying to make it work on real hardware

still pebble
#

20 computer restarts in, sigh

#

its lonely

#

For some reason the driver freezes right when runstop bit is set.

still pebble
#

😭 I lost all my fans, all my followers

#

Now I am just in an echo chamber

snow cloud
#

I'm here, and I added a star

#

here, that is

still pebble
#

Thank you Tigran

#

Debugging is more painful when I am lonely πŸ˜…

still pebble
#

Also, I pushed the latest changes to the Codeberg repository.

#

I also will have to rewrite my memory allocator, it is a mess

still pebble
#

Maybe I have to properly de-initialize the firmware's XHCI data structures

worthy jasper
still pebble
#

Ayyyyy!

#

Welcome back

worthy jasper
#

well, welcome back to you too :P

still pebble
#

Yeah I was gone for a few months lol

#

But I am happy to say my sine wave is at its peak!

worthy jasper
#

πŸ’ͺ

snow cloud
#

Go go go saalty! We're rooting for you!!!!!!

worthy jasper
#

hell yeah saalty!

still pebble
#

Thanks guys!

#

Right now I am stuck in a weird bug with calling my kernel main function

#

There is a triple fault for some reason

still pebble
#

Was a bug with some macros, should be fixed now

#

Yup, fixed

#

Right now I am trying to get HPET working to make everything run more smoothly

#

Looks like I did it

#

Probably my most simple driver so far

#

The OS boots smoothly now.

#

Going to screen record it's current state.

still pebble
#

If only there was a cycle accurate x86_64 emulator with hardware virtualization...

#

Then my job would be a lot easier

#

But at the same time it would be extremely slow

still pebble
#

Also I will need to rework the paging to support higher addresses than 4GiB

#

Pushed my latest changes

bitter echo
#

nice to see another codeberg user

still pebble
#

Aka microsoftification

#

I was also considering Sourcehut, but it's too minimal for my personal tastes

still pebble
#

I am considering doing a full rewrite of the OS

#

It feels like a skyscraper which has a foundation made of toothpicks, and if I make it offbalance it will crash down

proud pecan
#

anyway gl with the rewrite

still pebble
still pebble
#

I am thinking of making the rewrite be designed to be compatible with Windows

#

Maybe there will be a combination of UNIX and NT design principles

proud pecan
#

Make working set model vmm

still pebble
proud pecan
#

Search it

still pebble
#

well, online explanation of it is too vague

#

And from what I have read so far it seems to be for memoey managers that swap pages

#

I don't swap pages currently

proud pecan
#

basically

#

it's the pages that should be loaded to minimize page faults (to load swapped pages)

#

and maximize performance

#

only a set amount of pages can be in it at once

#

and it's limited by the working-set size

#

first link [here](#virtual-memory message) is a paper on it

still pebble
#

thanks for the info!

#

I guess me and ske will try to implement it once we have page swapping

#

as right now we dont swap pages at all

proud pecan
#

I'm implementing it in OBOS

#

and I'll probably add a swap along with it

#

*swap interface

#

the swap will probably just be some reserved ram region

still pebble
#

nice, i'll check out the obos thread once in a while to see your progress on it

#

and to have a reference implementation for me to go off of I guess

#

never swapped pages before so this will be something new

proud pecan
proud pecan
#

you just turn off the present bit

still pebble
#

i know how to swap pages, i'm just worried about the implementation specific bugs I might encounter lol

proud pecan
#

maybe store some info about where the page is in swap

#

then on page fault load in the page

still pebble
#

yeah

proud pecan
#

as for the working-set, in hindsight, it's simple, but the hard part is in how to determine its contents

still pebble
#

i guess the working set model attempts to minimize the amount of page swaps

proud pecan
#

the working-set (maximum?) size is user-defined I guess

still pebble
#

i see

proud pecan
#

there are a couple algorithms for it

#

one is in the paper

#

some others can be found here

In a computer operating system that uses paging for virtual memory management, page replacement algorithms decide which memory pages to page out, sometimes called swap out, or write to disk, when a page of memory needs to be allocated. Page replacement happens when a requested page is not in memory (page fault) and a free page cannot be used to ...

#

I plan on using the "aging" algorithm

#

it's described in the paper somewhere, although I don't think it was really named that in the paper

#

it had something to do with "used bits"

#

as for how you'd know when to change said "used bits" (aka the age)

#

you would basically make some timer

#

(periodic timer)

#

whenever it expires, I'm pretty sure you just loop over pages, checking the accessed and dirty bits in the pte

#

oring the two bits

#

and you'd also unset them

#

then, you shift the value you got from adding them into the age

#

then, to determine which ones are in the working-set, you or each bit in the age, whichever pages are zero, you don't put in the working-set

#

and whatever ones are, you put in the working set

#

now, I could be mistaken

#

maybe I misunderstood something

#

so if something I say is wrong, someone please correct me on it

#

the reasons why this algorithm is good are described in the wikipedia page

proud pecan
#

you could also check pages which have smallest age

#

that could work too

proud pecan
#

you swap out pages with the smallest

still pebble
#

I will try to follow that article πŸ˜…

proud pecan
#

just ignore the math part of the paper

still pebble
#

I can probably set up HPET to run another periodic timer to do what you are describing

proud pecan
#

I did that and it worked out fine

still pebble
#

nice

proud pecan
#

ignore the math

proud pecan
#

I've made a timer interface

still pebble
proud pecan
#

I made it because of the vmm though

#

I'm done the outer layer

#

I just need the hpet code

still pebble
#

Do you treat timer devices like drivers or are they seperate

proud pecan
#

the timer interface treats them as an abstract interface from the arch code

#

which is basically what a driver is

proud pecan
#

and the timer will be on some irq object initialized by the exteriour interface

still pebble
#

Unnamed OS development is probably going to end, in favor of an entirely new bootloader + kernel + OS designed ground up to look and function like Windows 10.

#

I will talk with ske about this, but a clean rewrite would allow us to have a much cleaner and more modern bootloader and kernel

#

If we end up going along with this new OS, we will probably make another thread in #1006498459798474873 for the new OS in order for people to be able to distinguish between this one and the new one.

#

And if anyone feels sad about this, Unnamed OS walked so the new OS could run.

#

One issue with the windows clone idea is copyright, and that will be tricky, but we will try our best to avoid using Microsoft's intellectual property

tight prawn
#

Windows clone in terms of GUI look or Abi and api?

#

Why not help make reactos better in that case

still pebble
tight prawn
#

Its not windows 10 compatible yet

#

Because it’s an absolutely incredible amount of work

#

You wont be windows 10 compatible even if you advertise yourself as windows 10

still pebble
#

You're right, I didn't think of the actual amount of work I would have to put in

#

But that leaves me the question of where I want to go with osdev.

#

At this point, I don't know what I want to make

tight prawn
#

I mean you can try

#

Making your own react os

still pebble
#

Yo guys

bitter echo
#

yo salty

still pebble
#

Decided to not rewrite everything and just, y'know, keep working on this one

#

Going to debug my USB driver on real hardware which is just as painful as it sounds

#

I already have a bug on real hardware with USB...

#

Also, how did you reply so fast r4

bitter echo
#

haha I happened to be looking at discord and it was an easy thing to type

still pebble
#

oh alright lol

bitter echo
#

good luck with your debugging πŸ™‚

still pebble
#

Thanks, I will severely need it

#

meanwhile js developers can just make a simple callback for a keypress... 😭

#

function keyDown() my ass

worthy jasper
#

lmfao

stray latch
#

Yo salty any updates on the OS?

still pebble
stray latch
#

YAY!

still pebble
#

Very awesome right?

stray latch
#

Yeah lol gn m8

still pebble
#

Getting motivation

#

Primarily going to focus on USB again, to try and get it to a polished and stable state

worthy jasper
#

LETS FUCKING GO

still pebble
#

Will be pretty exciting

still pebble
#

One thing that I want in my OS is the ability for the user to modify programs even while they are running, so like inspecting their exact RAM and writing to a programs RAM at any time

#

To allow this, I might add a command/syscall which would allow a root privilege user/program to "pause" a program's execution, unbeknownst to the program

#

this way, the user has even more control of their computer, as it should be.

#

Also will allow the user to inspect the CPU registers of the program's paused state

still pebble
slim edge
#

so a debugger?

sharp glade
#

LOL

slim edge
still pebble
#

good that it already exists

slim edge
#

just saying, the way you worded it makes it sound like a revolutionary feature

still pebble
#

I thought so at first, but then I remembered cheat engine and ptrace like you said

#

Slightly disappointed that it already exists but whatever

#

Well actually, cheat engine works by attaching itself to a process

#

Cheat engine is probably easily detectable

#

Not sure about ptrace though

slim edge
#

technically you can get the pid of the tracer process via procfs

#

and there are obvious ways to detect that you've been blocked for a while

#

like checking whether the time jumped forward by a large amount

still pebble
#

true

#

Back to the drawing board

stray latch
#

POV you make it kernel mode and give them full memory control

still pebble
#

Guess who is back

#

The USB driver is now more stable and has much better mouse support now

#

The video showcases it

#

The video shows the mouse stuttering quite a bit because of the software framebuffer blit lag, but without rendering its very smooth

still pebble
#

What's annoying is that my main OS is stored on my only nvme drive, so at the moment I cant test my OS on real hardware

#

Guess I will have to move my main OS to an AHCI ssd

bitter echo
#

be brave, test your os on that drive

still pebble
#

perhaps I should add partitioning support later

#

but its not really high priority

still pebble
#

USB keyboard works flawlessly now

#

Together with USB mouse

#

I think the USB driver is basically done now

#

Which is huge

tight prawn
#

Which controller

still pebble
#

Too tired to record a video right now lol

still pebble
tight prawn
#

Real hid or boot?

still pebble
#

Real

tight prawn
#

Damn nice

#

Did you test on real hw?

still pebble
#

thanks

still pebble
#

😭

#

I have to rewrite my driver to support more than 1

#

But shouldnt be too hard

tight prawn
#

How did you manage to not support that

still pebble
#

I might have been a little lazy

#

But

#

Should be a quick fix

tight prawn
#

Anyway saying its basically done without even testing real hw idk man

#

Also try other emulators at least

still pebble
#

I know, I am going to test it on real hardware

#

But at least on qemu it works (this doesnt mean much though from my experience 😭)

tight prawn
#

Yup

still pebble
#

Here, you can see the mouse drawing multicolor lines and me inputting text

#

Both mouse and keyboard through USB, and storage is through NVMe

#

Support for real hardware is definitely going to be worked on, but might take a while to get working

#

I'll give updates for the status of it

still pebble
#

So it shouldnt take too much work

#

(famous last words)

bitter echo
#

nice one, thats cool

still pebble
#

The saalty is back

#

And the latest update brings new features and optimizations to primarily the filesystem

#

Most significantly, the filesystem now supports file sizes which arent aligned to 512

#

The reason why this wasn't the case earlier, well, I wont answer that!

#

Also fixed several memory leaks, and other poor memory management

#

So the OS should be more stable than ever

#

USB support on real hardware is still in the works though.

#

The OS code also features a better interactive example of USB 3.0 keyboard and mouse

worthy jasper
#

YEAAAAAAAAAAAAAA