#The Flopperating System (tfos) - x86 32 bit Hobby OS

1 messages Ā· Page 7 of 1

bold grove
#

damn they got shit on

viscid zephyr
#

ho chi minh just wanted it more

#

he was fighting invaders of his country for literally 60+ years straight

bold grove
#

no wonder they named a city after him

viscid zephyr
#

from his 20s until he was elderly

bold grove
#

dang... what a life

viscid zephyr
#

he was an admirer of george washington because they were both liberators of their people from colonial oppression and he had a portrait of washington in his office

#

while we were actively at war with him

bold grove
#

yeah.. but at that point the united states government had already strayed so far away from the ideas of george washington

#

GW would be rolling in his grave

viscid zephyr
#

ho chi minh's military career was objectively far more impressive than washington's though

radiant grove
#

lounge-2

#

anyways what did i miss

bold grove
radiant grove
bold grove
#

ho chi is a legend

viscid zephyr
bold grove
#

if anythingwe did some things that were much wrose than the british

#

like we intered random japanese people here

#

for what reason

radiant grove
bold grove
#

yeah what a joke

radiant grove
#

we yall just ignored him so hard

viscid zephyr
#

we also rounded up all the inuits in alaska and put them in concentration camps deeper in the usa as well so that imperial japan couldnt kidnap them and turn them into spies

#

ppl forget that one

bold grove
#

i remember reading about that yeah

radiant grove
viscid zephyr
#

tbf imperial japan did actually kidnap a few alaskan inuits

#

they invaded alaska

bold grove
#

they did

#

alot of fucked up shit lmao

radiant grove
#

also japanese camps

#

i think that existed

viscid zephyr
prisma magnet
#

Oh god HOW did this chat devolve from osdev to Japan invading Alaska

bold grove
radiant grove
bold grove
viscid zephyr
#

OMG DISCUSSION IS ORGANIC I JUST REALIZED HTIS FOR THE FIRST TIME CUZ IM A BABY

radiant grove
bold grove
#

yeah fr

#

no we must talk about page tables

radiant grove
#

uhh

viscid zephyr
prisma magnet
#

No we must talk about the population of North American River Otter and how it relates to MOSFETs

radiant grove
viscid zephyr
#

nothing pisses me off more than discord mods seeing a discussion organically evolve into something off topic in an on topic channel, and nobody is trying to use the on topic channel for anything else, and they go "erm. please move to general"

#

thats just power tripping imo

#

serves zero purpose

#

just destroys an ongoing conversation (people never actually move, it always ends there)

#

for no gain

radiant grove
#

fr

viscid zephyr
#

other than ego stroking

bold grove
#

yeah fr

#

my thread is a safe space for any bullshit banter

radiant grove
bold grove
#

im the moderator here fr

radiant grove
#

mine too

viscid zephyr
radiant grove
#

my thread always turns into osdev-misc-2

bold grove
#

yeah

thorn dust
#

i really can't stand it

radiant grove
bold grove
#

becuase 5they think they will get brownie points

#

but it is annoying when youre on topic and someone starts talking about something off topic over the original conversation

#

but if there is an actual conversation

bold grove
#

who cares

thorn dust
#

whenever i've seen a conversation redirected never once have i seen it survive the redirection

bold grove
#

exactlyyy

#

conversation is natural

thorn dust
#

some servers have this stupid bot that posts a link to the "correct channel" but it still doesn't do anytihing

radiant grove
#

even if its an on topic convo

bold grove
#

yo dont tell people irl who are talking to go to another room bexcause its not the "conversation topic X room"

viscid zephyr
#

but if neither of these are happening then i see no reason for moderators to become involved

radiant grove
small hound
#

i use campbell (from windows)

bold grove
prisma magnet
small hound
#

copycat

viscid zephyr
#

theyre called moderators bc theyre meant to moderate discussion. for some reason some of them decide to become terminators who terminate discussion

bold grove
#

isnt it the default

bold grove
#

some outliers but

#

not many issues here

#

plus the actual chat is moderated well

#

any obscene stuff/ slurs

#

gets taken care of quickly

#

i only talk in this server becuase so many otyhers have annoying ass mods

prisma magnet
#

ToaruOS has affected brie cheese in a lot of ways

radiant grove
#

i remember seeing a thread where some guy said the n word and then right after a mod is like "ok thats it the guy's getting banned"

#

he was never seen since

thorn dust
#

sometimes i think it means you rattled the moderators' sensibilities by having a different position to them, and they redirect out of spite

viscid zephyr
#

it can also be laziness

#

they get annoyed conversation is happening at all while theyre busy and cant pay attention

#

i think its pretty thoughtless and a sign of a terrible person to have petty power though

#

its incompetence plain and simple

#

dont tell THEM that though!

thorn dust
#

unfortunately it's widespread

bold grove
viscid zephyr
#

theyll incompetently inflame the issue until they have an excuse to incompetently ban you

thorn dust
#

we all know exactly which server we have in mind when we talk about this kind of moderation, and exactly the conversations we've had that were terminated this way

bold grove
#

i was on this embedded systems server and i got banned because i suggested that the i386 isnt the best embedded processor

prisma magnet
#

Fufu and egusi has affected Bosnian OS Development Time rates by a LOT!

viscid zephyr
#

i wont name names

#

but theres a few mods here i literally only ever see when they do that

#

its infrequent but it occurs

bold grove
#

yeah we know who too

prisma magnet
#

let's not name them

#

but we know who

radiant grove
#

i dont and now i am curious

#

or i forgot idk

prisma magnet
#

Emacs is really nice for developing cat food devices

thorn dust
bold grove
#

guys im gonna stream on twitch soon

#

if you wanna watch

radiant grove
#

stream what and where

#

me interested

#

whats the channel name

bold grove
radiant grove
#

i found a mod for ultrakill that allows to change style rank names

radiant grove
#

idk

#

shooter game

#

shoot people

#

they die

#

doom eternal on steroids

#

and also lots of blood because lore (and gameplay) reasons

small hound
#

stream osdev fr

radiant grove
bold grove
#

but i realized it would be alot of me reading

#

and sitting

#

and banging my head on my desk

#

OSDev ā„¢

bold grove
small hound
#

there are plenty that i already watch

#

so peak

bold grove
#

really?

#

who

small hound
#
radiant grove
small hound
#

Watch AI engineer use 100 CPU threads & 240GB RAM to finish porting AMD ROCm AI to RISCV-64!

radiant grove
bold grove
#

i remember binder made a functioning C compiler using LLM's

#

@hollow igloo

radiant grove
#

vibe coders i just dont understand

#

writing something cool with ai as a shits and giggles thing is really cool

#

but making it a career is just kinda weird

bold grove
#

making it a career is crazy

#

yall ever just have intrusive thoughts of deleting your whole repo, banishing it from your brain, and starting over?

radiant grove
#

i do

bold grove
#

smp is really making me consider it

#

because i wrote alot of my os without smp in mind

#

and now its just a process of migrating everything

radiant grove
#

i honestly just sometimes want to be reborn as a big ceo so i can have free slave workers and not pay taxes

bold grove
#

dont we all

#

sometimes i wanna be a hunter gatherer in the steppes of mongolia and throat sing for my wife

bold grove
#

still cool though

#

they have lots of potential

radiant grove
#

llm's are confusing

#

its hard to make them understand you

#

like a person might immediatelly understand your request but an ai is big stupid so it wont

bold grove
#

they dont really speak human language

#

they speak what they think to be human language

#

i mean

#

theres a phenonmena where

#

if you make two ai's talk to each other

#

they will evntually start talking in a labguage only they can understand

#

and it sounds like gibberish to us measly human mortals

#

which is really fucking scary

radiant grove
#

gibberlink

#

i swear that video was a shitpost

#

there is no way that wasnt programmed intentionally

bold grove
#

no ive literally recreated it

small hound
#

it's a half satire thing

#

this is fully intentional

#

and by design

bold grove
#

yeah its not as intense as the meme makes it seem but its still crazy

#

they end up just speaking weirdly

small hound
#

GibberLink is an acoustic data transmission project, posted in GitHub, in which two conversational AI agents switch from speaking to one another in a Human-listenable language (such as English) to their own unique language that consists of a sound-level protocol after confirming they are both AI agents. The project was created by Anton Pidkuiko ...

small hound
radiant grove
small hound
#

this would be ridiculously infeasible for LLMs to just go and do on their own

bold grove
small hound
#

what šŸ’”

bold grove
#

Like we made our chat gpts talk to each other and the language kept getting harder to understand

#

And eventually it stopped

small hound
#

huh

#

me when I turn the chatgpt temperature slider to the maximum

radiant grove
#

it probably actually relies on a human to be understandable

hollow igloo
bold grove
bold grove
#

ah yes

#

my favorite source file

#

cpu/cpushit.asm

bold grove
radiant grove
radiant grove
bold grove
radiant grove
#

this is a cpushit of all time

#

what does this even do

#

floating point stuff?

#

whats xchg

bold grove
#

This part of it yes

bold grove
radiant grove
#

oh

bold grove
#

It’s smp stuff

radiant grove
#

mk

bold grove
#

You know what atomics are?

radiant grove
#

unstoppable operation iirc

small hound
#

wait you dont need it nvm

#

i forgor

bold grove
#

_______________atomic_set_and_test

prisma magnet
small hound
#

If a memory operand is referenced, the processor’s locking protocol is automatically implemented for the duration of the exchange operation, regardless of the presence or absence of the LOCK prefix or of the value of the IOPL.

šŸ’„

bold grove
#

This is just a file full of cpu shit

#

That’s why I called it that

#

Basically

#

Has everything

prisma magnet
#

wait can i say this

#

probably yes or no

#

"howcanibehomophobicmybitchisgay'

bold grove
#

LMAO

#

THATS HILARIOUS

#

and no, you won’t get banned for that lol

#

If anything that ISNT homophobic

prisma magnet
#

suure

#

i wrote that variable in my terrible lexer

bold grove
#

In my new vmm I have a variable called ā€œpage_to_shit_outā€

radiant grove
prisma magnet
#

in that same lexer i also have vars named fuck and useless

radiant grove
#

all my debug variables are named france

prisma magnet
radiant grove
prisma magnet
#

why just why

#

i also wrote this masterpiece in my acpi thing

prisma magnet
radiant grove
#

limine couldnt scan the framebuffer tag (i use mb2)

#

so i just added a few blank items to shift it back

prisma magnet
#

and why are you doing this in asm

radiant grove
#

why would i use limine's boot protocol trl

prisma magnet
#

limine with mb2

#

legal

#

but actually no youre under arrest

radiant grove
#

WRONG

#

im not arrested because i said so

unborn latch
unborn latch
#

this is your time

radiant grove
#

didnt work trl

radiant grove
#

if it works it works

#

if anyone ever is gonna change it im bringing the wrath of zeus onto your house

bold grove
bold grove
#

This is how I pregamed floppa os months ago:

#

Me in green

prisma magnet
#

Or high

#

Or mental

#

Or all of the above

bold grove
#

Yes we were all high

prisma magnet
#

All of the above

#

Got it

bold grove
#

Yeah

prisma magnet
#

Do not.

small hound
#

šŸ¤‘

bold grove
small hound
#

nop

small hound
radiant grove
#

linus

bold grove
#

Okay guys

#

I’m gonna actually do the big ahh commit

#

Tn

bold grove
#

@small hound I’m doing tlb shootdown

small hound
#

šŸ’„

bold grove
# small hound šŸ’„

So basically the concept is to invalidate the page mapping for the current cpu then send an ipi to tell all the other CPUs to invalidate it too?

#

Am I correct or

small hound
#

that's the naive approach yes, it can get you a simple, slow, but functional TLB shootdown

bold grove
#

Is it good enough

#

Like

#

Is that standard

small hound
#

it can be good enough if you have 4 cores but as soon as you start scaling beyond that things get hairy

bold grove
small hound
#

it's not standard no, real kernels use much more advanced things

bold grove
#

I figured

#

But in terms of functionality

#

Is my concept decent

small hound
#

you can always make it more complete later on

bold grove
#

Well I’m not going for complexity or anything like that

#

@small hound do you register your ipi handler before or after initializing smp

small hound
#

I do it when I IDT init... ok

#

you should already have some dynamic ISR registration method

bold grove
#

Okay so ap’s don’t need to be started before that, got it

#

I do

small hound
#

šŸ‘

small hound
bold grove
#

I haven’t gotten that far but that’s the plan

small hound
#

sounds unnecessary

#

linux doesn't do that

bold grove
#

Okay bet

small hound
#

just one global IDT

bold grove
#

I won’t do that then

small hound
#

the main thing is you get very little benefit out of that

#

just added complexity

bold grove
bold grove
small hound
#

or isr_register for something more arch agnostic lol

bold grove
#

Yeah but my shit is ia32 or leave the room

small hound
#

šŸ’„

bold grove
#

Jk jk

#

Not a bad idea

small hound
#

I guess you'll find out after you implement and test it, it varies from kernel to kernel

bold grove
#

Yeah true

#

I’m also gonna do proper mutexes after this

#

Is making a purely cooperative scheduler insane

small hound
#

not unheard of

bold grove
#

I kinda want it to be yield() only lmao

#

Fuck ticks

small hound
#

I mean we obviously have stuff like language runtimes that do that but in kernels it's not unheard of

small hound
bold grove
#

Mmmm idk because funny

small hound
#

whimsical even

bold grove
#

I just saw some bizarre kernel that had one and it looked interesting

#

Forgot the name but

#

It was from like 2007

#

And it supported xorg

#

Which is insane

small hound
#

it was cooperative only

bold grove
small hound
# bold grove no but that is a notable example of one

I don't really think you gain anything from cooperative only scheduling, besides you can always make standard scheduling that is preemptive and cooperative and then just turn off ticks with some syscall or whatever

#

so you can just build a standard scheduler and then have a way to switch to cooperative only mode or something

#

not super hard to do

#

I mean it is quite literally just a

void lapic_timer_disable() {
    uint32_t lvt = lapic_read(LAPIC_REG_LVT_TIMER);
    lvt |= LAPIC_LVT_MASK;
    lapic_write(LAPIC_REG_LVT_TIMER, lvt);
}```
#

with some fancy stuff and other wrappers around it

bold grove
#

To get the highest frame rate

small hound
#

this way when they finish running (block or the thread terminates) the scheduler tick comes back to run the timesharing threads

#

and then it goes away again when the realtime thread runs once again

unborn latch
#

like you want the bubble

bold grove
bold grove
torpid viper
torpid viper
torpid viper
bold grove
torpid viper
bold grove
#

Ahhhh

#

I’m Bosnia… Bosnian

bold grove
#

I went to Ʈle de France

#

And champagne

torpid viper
bold grove
#

So Paris

torpid viper
torpid viper
radiant grove
bold grove
#

I’ll post some tests later

paper cloak
paper cloak
bold grove
small hound
#

#define MAX_CPUS 8

paper cloak
#

I said hundreds of tlb shootdowns

#

Not hundreds of cores

bold grove
#

Ohhh

paper cloak
small hound
#

lame

paper cloak
#

Nvm it's 4096

bold grove
#

How do you do a more efficient shootdown

small hound
#

there we go

small hound
bold grove
#

Ahhhh

#

For each core?

paper cloak
#

rcu is the limitation here

bold grove
#

I’m assuming

small hound
#

like if you have a process and it only ever has run on core 0 there is no need to do any shootdowns at all for its pages

paper cloak
#

Ideally you want to reduce tlb shootdowns

#

As they are inherently very expensive

bold grove
#

Yeah invlpg is a slow instruction

small hound
#

and so is the IPI

bold grove
#

I’m pretty sure it’s probably the slowest one period

small hound
#

false

#

wbinvd trl

bold grove
#

At least that’s the worst one I know

#

Jesus

small hound
#

you havent seen many x86 instructions i guess

#

there's also the more interesting ones like rdseed

bold grove
#

No im more of a C guy lol

small hound
#

what does that have to do with not knowing cpu instructions tho

#

šŸ’„

paper cloak
bold grove
small hound
#

i would say wbinvd and rdseed are the more famous ones tho

#

understandable

paper cloak
#

is rdseed that slow?

hollow igloo
#

1200 cycles ish

#

with 64bit 2500

paper cloak
#

also it depends on how you count instruction speed

#

Like wbinvd has very slow side effects

#

But is the execution of it actually slow?

hollow igloo
#

movnti sucks

#

cpuid is like 100

#

fbstp 288

#

xsave 339

#

xsavec 623

#

so xsavec is the slowest direct instruction on zen4

#

no... I fucked up.. .thats is the number of microops

small hound
#

invlpg seems to take ~200ish clock cycles

#

idk I'm relying on kvm with -cpu host, might be very wrong

hollow igloo
#

bunch of moves which are around 1000

bold grove
#

Big things are coming my friends. @crimson plover knows trl trl meme meme

rigid root
#

U cant leave us hanging

bold grove
rigid root
#

Thats cool

bold grove
#

So I guess this will be a descendant of FloppaOS just in long mode

#

For example my pmm can literally stay the exact same

#

Same with my synchronization primitives, etc

rigid root
#

Makes sense

bold grove
#

I’m getting sushi in Hawaii rn yall wanna see?

crimson plover
#

for sure

bold grove
#

I’m a big back so I forgor

#

But my dad took a nice photo of me

#

Also

#

I have a sneak preview (cool amarat)

#

Amarat with glasses

#

Faceass

rigid root
radiant grove
bold grove
rigid root
bold grove
#

I got kava… it’s like a traditional Hawaiian/pacific island drink that gets you buzzed

small hound
bold grove
small hound
#

you are drunked

bold grove
#

Mom takes nice photos

#

I’ll post some progress tonight

#

Non alcoholic cocktail btw

blissful grove
#

hell yeah, enjoy hawaii šŸø

bold grove
#

hey gang

#

i got the bootloader working

#

tomrrow will be source tree structuring!

#

good night chat

radiant grove
bold grove
bold grove
radiant grove
#

evil

bold grove
#

Hi guys

#

Gonna work on kernel

radiant grove
bold grove
#

I got sushi again

#

And I remembered to take a photo

radiant grove
bold grove
#

FloppaOS thread became food picture thread real

radiant grove
bold grove
#

So I’ve gotten some stuff done

#

With the new fart

radiant grove
#

what stuff

radiant grove
# bold grove With the new fart

The NewFart Microkernel Technology is a revolutionary new system, allowing deep integration of Apple Intelligence in its' core, now powering over 6 million MacBooks worldwide trl

bold grove
#

Well I’ve got long mode, got the new bootloader working, ported my pmm and started on my new vmm

bold grove
#

Imagine the day where every computer runs FloppaOS

#

I think they would all blow up

radiant grove
#

im addicted to microkernels now they're somewhat peak

bold grove
#

I was convinced that I should change mine to a microkernel

radiant grove
radiant grove
#

i kinda already changed it

bold grove
#

Do you have userspace

radiant grove
#

idk i might just have a shit ton of hard disk and storage drivers to boot the everything

radiant grove
bold grove
#

Okay then your kernel isn’t a microkernel, by default it’s monolithic

radiant grove
#

ok fair

bold grove
#

You cannot have a microkernel without running drivers in userspace

#

At that point it’s a buzzword

radiant grove
#

oh ok

#

my plan is to run drivers in userspace

bold grove
#

Maybe you should read up again lol

bold grove
radiant grove
#

no no i know what a microkernel is

#

minor brainfart there

bold grove
#

It’s okay lol

radiant grove
#

im planning it to be a microkernel like run 99% of the drivers in userspace

#

hybrid ke- trl

bold grove
#

I forgot what initrd meant for like 5 minutes earlier because I didn’t have my morning coffee lol

bold grove
#

Keep that cancer away from me

bold grove
radiant grove
#

i meant General Assembly resolution 39/46 of the Geneva Convention
-# (Convention against Torture and Other Cruel, Inhuman or Degrading Treatment or Punishment)

#

oops

bold grove
#

Balkan Slavs don’t follow the Geneva conventions

#

More like Geneva suggestion trl

bold grove
#

I don’t even think most Linux kernel images have 100 drivers lol

#

But there’s definitely more than 100 in the whole kernel

radiant grove
#

i just realized i dont think i can write a microkernel that actually works on things

#

nvm

#

because i need like a shit load of hard drive access points

#

to get like 99% of the drivers

#

a microkernel runs all its' drivers in userspace but idk if i should run the fucking ps/2 driver in userspace or some other thing

#

ykw im gonna move it to user space when i get there trl

#

Theas Fucking Keybordbs

bold grove
#

Bro

#

I have so much to tell yall

radiant grove
bold grove
radiant grove
#

Joe

bold grove
#

I found this funny code comment in my os

#

// TODO pt2: fix clunky bits of the allocator such as alignment, guarding, and setting the heap vmm region 
// so uhhh basically everything but it works so I don't care for now. 
radiant grove
bold grove
#

I love yall just saying

#

Thank you for caring about my dumb os

#

Floppa fart

#

Good night

#

Okay maybe not good night

#

Maybe a little kernel dev first

#

I decided on a name

#

FloppaOSx64

crimson plover
#

drop the x

torpid viper
bold grove
radiant grove
#

drop the floppa

#

OS64

bold grove
#

Just drop everything

#

Name it ā€œ ā€œ

unborn latch
#

no

#

Name it ā€œā€œ

bold grove
bold grove
#

I sent this to @crimson plover

#

But imma explain my concept for the vfs

#

I’m gonna represent physical memory regions in the vfs
I also will represent virtual memory regions in the vfs
I'm really aiming to make an abstraction of the hardware in the vfs
I think it'll make my life a lot easier
Like each slab will be represented with a vts object
I'm gonna try to make a new standard
Like not Unix at all
Butttt | plan to make a posix compatibility layer
I think I'll make something similar to wsll... where Linux syscalls are represented using the equivalent windows syscall
I kinda like NT in some ways, especially its VFS and I like the concept of the registry I am gonna do something similar But it won't be nt-like at all
Just some inspiration
I'm thinking about calling it the Keywall
"Keys" represent registries
And are hierarchal
I have this written down somewhere
Keys will also be... you guessed it... represented in the VFS

#

There’s my vfs yap :)

paper cloak
#

It's a whole-ass virtualized Linux

#

WSL1 was a translation layer, which was cooler from a technical point of view but it sucked

#

Also NT doesn't have a VFS flush

bold grove
#

But the registry, security control, task scheduler, all that shit is part of the vfs

bold grove
#

Which converted Linux syscalls to windows syscalls

paper cloak
#

These are all their own subsystems lol

#

Pretty much

#

The scheduler/dispatcher is in the kernel (Ke)

bold grove
#

At least that’s what I see it is

#

It’s hierarchical

#

Or I guess a form of a vfs

paper cloak
#

Where are the files

bold grove
#

Each registry entry is a vfs object no? Idk maybe I throught of it wrong

paper cloak
#

It's just a hierarchical structure with named objects, like a VFS is

paper cloak
bold grove
viscid zephyr
bold grove
#

In a context like this

viscid zephyr
#

not in the unixlike way though

paper cloak
#

He wasn't referring to the object namespace

paper cloak
#

the object namespace anyway is not a very elegant design

paper cloak
# torpid viper it does

the object namespace has similar functionality to a VFS but it is pretty far from a traditional unix-like VFS

paper cloak
torpid viper
#

the thing that allow to mount stuff as a:/ b:/ and other is a vfs

#

not a very complex one

#

but still it's a vfs

#
  • the vfs handle some special devices
paper cloak
#

Isn't A:/ just translated to like \Device\Disk whatever

torpid viper
#

like COM0 and stuff

paper cloak
#

In the object namespace

torpid viper
paper cloak
#

No, how?

paper cloak
#

Anyway, there is better stuff to steal from NT imo

bold grove
#

I like push locks a lot

#

Astral has one

paper cloak
#

turnstiles tho

viscid zephyr
paper cloak
#

Also astral's is broken afaik?

viscid zephyr
#

he fixed it

paper cloak
#

Ah great

bold grove
#

No it works I tried it earlier

#

But yeah it was borked for a bit

bold grove
#

Probably easier to implement anyways

paper cloak
#

A nice thing to steal from NT is generic handles/capabilities instead of just FDs

#

Also the layering is pretty nice imo

#

And irql

#

(those are not all unique NT concepts)

bold grove
#

NT does them well tho yeah

viscid zephyr
#

initially

#

when you add priority inheritance is when the picture changes

#

then pushlocks are harder

#

and turnstiles are easier

paper cloak
#

Just implement autoboost

viscid zephyr
#

autoboost is hard

paper cloak
#

Skill issue

#

literally the easiest thing ever

viscid zephyr
#

fym skill issue none of us even know how it works other than the broad strokes

paper cloak
#

You didn't try hard enough trl

#

Will if you ever work at Microsoft will you come back to this server with autoboost wisdom

fervent flare
#

It's essentially priority inheritance.

north hull
#

this is common with turnstiles

north hull
#

with autoboost there is a very unclear moment in the case when all autoboost entries exhausted

#

theres no longer a limit of 6 entries but apparently there's still some limit since EtwTraceAutoBoostEntryExhaustion exists

bold grove
small hound
#

linux workqueues have this funny deadlock recovery with rescuer threads

#

Regular work processing on a pool may block trying to create a new worker which uses GFP_KERNEL allocation which has slight chance of developing into deadlock if some works currently on the same queue need to be processed to satisfy the GFP_KERNEL allocation. This is the problem rescuer solves.

When such condition is possible, the pool summons rescuers of all workqueues which have works queued on the pool and let them process those works so that forward progress can be guaranteed.

This should happen rarely.

#

🤪 pretty silly

bold grove
paper cloak
#

They avoid priority inversion

bold grove
#

I see

small hound
#

šŸ’„

#

deadlock recovery is definitely an interesting thing tho and there are places where they can be recovered from (like the linux workqueue GFP_KERNEL allocation deadlock)

bold grove
#

Man honestly I might switch back to vga text mode and I don’t care what anyone says about it

paper cloak
small hound
paper cloak
#

There's probably a cleaner way to do it

#

But it's slower or something so they just hack around it

small hound
#

I guess they could have the gfp_kernel allocation spawn a separate thread/wake a separate thread on that path

viscid zephyr
hollow igloo
small hound
# hollow igloo where did you find a deadlock?

https://docs.kernel.org/core-api/workqueue.html

Regular work processing on a pool may block trying to create a new worker which uses GFP_KERNEL allocation which has slight chance of developing into deadlock if some works currently on the same queue need to be processed to satisfy the GFP_KERNEL allocation. This is the problem rescuer solves.

When such condition is possible, the pool summons rescuers of all workqueues which have works queued on the pool and let them process those works so that forward progress can be guaranteed.

This should happen rarely.

#

it's recoverable

hollow igloo
#

yea... thats not a deadlock

#

really starvation

small hound
#

hmmm ok I guess they just described it differently

hollow igloo
#

picture this...

you have tasks A, B, C, and D

#

A needs to complete before B, C, and D

#

they get inserted into the queue as
Head -> B, C, D, A
If you have 3 workers then they will pickup B, C, and D
and it will never progress

#

might not be the exact issue here, but sounds similar

bold grove
#

Drinking Hawaiian monster flavor on my last day in Hawaii :)

bold grove
rigid root
#

bro flexing

violet anchor
#

does it taste of Hawaii

hollow igloo
#

you keep keep beaches and sand... I like mountains and trees

violet anchor
#

Hawaii has mountains that spray molten rock. the best kind of mountains. tends to set fire to trees though

bold grove
bold grove
bold grove
bold grove
#

man i fucked up paging somewhere

radiant grove
bold grove
radiant grove
bold grove
radiant grove
#

floppa os if it was medieval:

bold grove
#

Work has continued

torpid viper
bold grove
foggy cedar
bold grove
#

Okay I’m making the operating system less shit

#

So I decided to keep on with this kernel for now

#

Just because I want it to be good first

#

And it was not good before

bold grove
#

my logs are fucking atrocious

#

@hexed notch šŸ’€

#

I have the worst meme os

radiant grove
#

look at mine

hexed notch
bold grove
radiant grove
#

peak logs fr

#

i dont need these filthy logs anyways trl

#

how's progress doing tho

bold grove
#

Yeah no they’re pretty fucking braindead

radiant grove
#

it's two thousand yard stare nevermind

bold grove
#

Nah it’s just shit

#

I completely removed my vmm basically

radiant grove
#

installing limine broke my windows xp install

#

big pain

bold grove
#

Also I removed my vmm because it was shit

hexed notch
#

fair enough 🤣

radiant grove
bold grove
radiant grove
#

56342nd time's the charm tho

bold grove
#

I’ve made a tlb shootdown

#

@small hound trl

bold grove
#

Okay so we have a vmm again

#

I’ll push it sometime

#

I was thinking about doing modules

#

But eh I don’t need them

#

Gonna work on scheduler

#

And all that good stuff

#

I’m doing tlb shootdown by sending an ipi to each cpu

#

Eventually I’ll make this lockless

#

By having per cpu allocators

#

Or something idk

bold grove
#

heres the start

#

no multicore yet though bc of invlpg

#

mapping works

#

My vmm region just has a pointer to the pd and the next region

#

Dude I’m fucking cooking

#

Okay so now I have to

#

Make this multicore

#

When I get back to my pc

radiant grove
bold grove
#

I’ve made functions to copy and nuke page maps

#

Which was the weirdest part

radiant grove
#

void vmm_fuckshit();

radiant grove
bold grove
#

Copying a pagemap requires you to copy all the mappings

#

Which can be kinda involved

radiant grove
#

oh

#

right

bold grove
#

Nuking a pagemap is fine

#

You just need to make sure you don’t leak anything

bold grove
bold grove
radiant grove
bold grove
radiant grove
bold grove
#

Actually don’t

#

Please don’t

#

I still treat all my pds and pts as 32 bit ints

#

Don’t even use a pde struct

radiant grove
#

same :(

bold grove
#

I mean that’s what they are

radiant grove
#

wait pds and pts as in pagetables?

bold grove
#

But it’s not as clean

radiant grove
#

and pagedirs?

bold grove
radiant grove
#

ok same my code is ass

bold grove
#

I mean that’s what they are

radiant grove
#

but like

#

fancy

radiant grove
#

like beyond different

bold grove
#

It’s shite

#

Well

#

I want a decently featured vmm

#

I’ve got

#

Mapping and un mapping (

#

Regions

#

Cloning and destroying them

radiant grove
#

nice

bold grove
paper cloak
#

how do you do it

#

refcount?

bold grove
#

I just clone the page tables

paper cloak
#

boring

bold grove
paper cloak
#

depends

#

your copy routine will be much simpler

#

but your page fault handler will do more things

bold grove
bold grove
gentle flicker
# paper cloak boring

I do, and it sucks, I just clone the regions whenever a page fault is handled and whenever it's requested it is freed independently from the parent address space :)

paper cloak
#

wha

#

you should use a per-page refcount

#

and you know that if you have a write fault with ref > 1 and the paged is marked CoW then you need to make a new mapping and copy the data there

gentle flicker
#

but I don't keep any refcount, as I said it sucks, it's held together with duct tape and not optimal at all

bold grove
#

Okay mapping

#

And shit

#

Is done kinda

#

Now I’m working on tlb shootdown

bold grove
#

okay i pushed stuff

#

not tlb yet

#

heres pagemap cloning

#

heres my (simple) vmm region data structure

#

its interesting that after the rewrite my vmm init became much simpler

#

@torpid viper vmm rewrite!

bold grove
bold grove
#

yayyyyy

#

now we do nothing

bold grove
#

im actually satisfied rn

#

for the most part

#

with how things are going

torpid viper
#

do you have CoW ?

bold grove
#

i just copy mappings

torpid viper
bold grove
torpid viper
#

i think a little bit of arch abstraction would have been better

bold grove
#

I don’t have any hardware abstraction layer

#

It’s just ia32

torpid viper
#

trust me this will avoid a lot of shit

bold grove
#

what if i want only one arch

#

or is it good to still have a hal

#

regardless

crimson plover
#

nah

#

if u are just tryina finish ur x86 kernel dont do the hal

#

just finish it and do a hal for the x86_64 one

bold grove
#

okay thank you

bold grove
#

I added aslr

#

And this thing called randframe

#

Which randomizes all of the physical frames within a virtual region

#

Kinda just extra security

#

Idk I thought the idea was cool

gentle flicker
gentle flicker
radiant grove
bold grove
gentle flicker
bold grove
#

I added more stuff

#

Into the vmm

#

More physical page randomization within the vmm

#

And cloning

#

With randomization

bold grove
#

I made my vmm before the heap back in the day

#

I just rewrote my vmm

#

And my heap doesn’t rely on my vmm

bold grove
#

Im gonna work on expanding my region descriptors

bold grove
#

Gn chat

bold grove
#

Yeah region descriptors are getting better

bold grove
#

Hey gang

#

No work today on the os most likely

#

I’ve been doing a lot of vmm stuff

#

Kinda a bit burnt out for now

#

We’re gonna work on smp tomorrow though

#

And actually integrating it

#

First I’ll need proper trampoline code which

#

I think I’ve almost figured it out

bold grove
#

i kinda made my mapping functions better

gentle flicker
#

your codebase honestly looks pretty organized

#

I could never

bold grove
gentle flicker
fallow orbit
bold grove
fallow orbit
#

oops. To other architectures

bold grove
#

At some point

bold grove
#

I’m probably just gonna stick to single core

#

For a while because

#

I need to relearn scheduling concepts

#

Mine just doesn’t work how it should

bold grove
#

Working on scheduler

torpid viper
bold grove
bold grove
#

Okay I got it working

#

I’m gonna make a video game now

#

Just to prove the concept

bold grove
#

Well I’m shit at that

#

Still working on it

radiant grove
#

floppogames

bold grove
radiant grove
torpid viper
radiant grove
bold grove
#

Ok gang

#

Scheduler has some issues lol

#

I’m doing preemption with the PIT

#

Kinda running into an issue where certain threads get starved

#

Man fucking hell

#

I have so many ideas for the scheduler but I am not at my computer or at home šŸ˜”

crimson plover
#

this is why we need to design the fucken pcb

#

lol

#

unfortunately this weekend im not at home

#

next one I might be but then im going to paris

#

so basically fuckall time this month

bold grove
#

I wish I was home šŸ˜”

crimson plover
#

yessir

#

timezones are a bitch

paper cloak
bold grove
#

Me and wux (and a few friends) are designing something cool

#

I don’t wanna give it away without @crimson plover permission

radiant grove
crimson plover
#

we need to make the main board the SOC is going to slot into

bold grove
#

Okay new scheduler is up

#

So

#

It’s able to handle multiple cores but for now it’s just preemptive with the PIT timer

bold grove
#

So we have priority handling

#

And also I have a way of pushing starved threads to the front of the queue when they wanna run

bold grove
#

So basically each thread gets a starting quantum of 10 ticks then if it gets starved it gets a gold quantum of 20 ticks

bold grove
#

I came up with this shit in a dream

#

I think it’s valid

#

Threads aren’t getting starved anymore

paper cloak
viscid zephyr
#

I'm dieting

#

Thanks for being insensitive

bold grove
#

The gold quantum gets set back to the base after the starved thread runs

paper cloak
#

Idk why you need this

#

If they all run at the same timeslice then there is no starvation

bold grove
viscid zephyr
paper cloak
#

I didn't know he had priorities tho

paper cloak
bold grove