#MINTIA (not vibecoded)

1 messages · Page 5 of 1

twilit smelt
#

the like "rationalist" sphere is a huge trap for ppl prone to this

#

they subscribe to an ideology thats literally called "smartism" and developed by weird crypto-nazi bloggers so it shouldnt be surprising it attracts mostly this kind of dumb person

#

theyre elon's favorite type of useful idiot though so its funny to see the language being used to shit on him

cunning mortar
#

i mean

#

you can tell by what Musk does and says that he's definitely not a genius

#

he's just smart enough to scam everybody but one day the tide will turn on him

twilit smelt
#

I wasn't defending him at all I was just ALSO insulting this person

cunning mortar
#

lol fair

raven drift
#

Regardless of whether he is smart / has a high IQ he's clearly also pushing his own agenda and exploiting his power and money

#

smart != wise

#

There are lots of smart ppl that are also insane

#

Ted Kaczynski was also smart

glass sparrow
#

elon musk is cool and deserves to be unelected god emperor of earth because tony stark space X diablo II megagamer god

#

can I go on a warm take for a second, I have how this administration is calling everything czar

#

like, the border czar, the market czar, the internal affairs czar, please, shut the fuck up, just call it an actual term

twilit smelt
#

that's like an American thing

#

if not generally an anglosphere thing

#

we call ppl czars in politics for some reason

glass sparrow
#

your culture is rotten if that is the case, and you get what you deserve

night needle
glass sparrow
#

republicans against trump dont exist

twilit smelt
#

or other special circumstance

glass sparrow
#

why not call them idk, head of the whatever comission

#

or like something more descriptive

twilit smelt
#

It's not like a real title though it's like colloquial

twilit smelt
glass sparrow
#

you mention someone is a czar im imagining you as a 13yo commie on the internet posting memes of whoever the czar is pasted on communist propaganda

#

its innate

twilit smelt
twilit smelt
#

I think they notably shot the last one in a basement

glass sparrow
#

I dont know this is vibes

#

my whole argument is a vibe check of american culture

warm pine
#

Term also used here but probably an American import

mortal thunder
twilit smelt
#

yall think it makes sense to require special privileges to raise your own priority but not to lower it

heady bobcat
#

yeah, because lowering your priority is, in a way, voluntarily giving up resources (CPU time) to others

glass sparrow
#

depends, can lowering a task's priority hurt the system

twilit smelt
#

shouldnt be able to

#

priority inversion is accounted for

glass sparrow
#

the reason these things have permissions attached is because DoS potential

#

if there is no DoS potential, then you dont need one

digital pivot
twilit smelt
digital pivot
white valley
#

also there shouldnt be one privilege for all priority levels like

#

a process shouldnt go "oh i have the privilege" and max out its priority

twilit smelt
#

yeah i was gonna split out a privilege for the real time priorities (upper 16) vs user priorities

digital pivot
#

maybe allow only changing some sort of priority classes like low, medium, and high

#

why would regular apps change their priority

twilit smelt
#

to be nice

white valley
digital pivot
twilit smelt
#

privilege is a diff thing, basically im having each processes have two privilege bitmaps. a "set of privileges i have" bitmap and "set of privileges i've enabled" bitmap

#

you can enable any privilege in the former bitmap

#

but the enabled bitmap is reset in each new process

#

so you have to explicitly enable a privilege before u use it

white valley
#

doesnt sound like a useful security measure

#

unless you're trying to prevent your children from accidentally doing shit that they arent supposed to do or smth

twilit smelt
#

for 1 it makes it more difficult to do arbitrary stuff if you manage to get a privileged process to do stuff it shouldnt

#

for 2 it makes it more difficult to accidentally do evil shit as a privileged process (which is similar or the same as #1 if its being caused maliciously)

white valley
#

"making it more difficult" doesnt really matter, it'll get done anyways

#

for security i would aim to make it impossible / possible

#

though it does make sense for #2

#

but then you have to consider the ways a process could accidentally do evil shit

#

idk if this extends to file perms but maybe you could prevent processes from accessing files outside of the executable directory unless a certain priv bit is set

#

which could prevent situations like rm -rf / home/will/mathassignmentcalculus

twilit smelt
white valley
raven drift
#

Ambient authority has a lot of problems so relying on it for a new design seems strange to me

green pelican
#

ambient authority is nice to have on top of an existing access control mechanism

#

its useful to be able to say "dont let me write to this area of the filesystem" or equivalent

#

if you make the permission bitmap a write once afair then you've basically got seccomp

twilit smelt
#

privileges are more coarsely for "can i do this system service [with these flags] at all" basically

#

on top of capabilities with fine grained permissions

raven drift
#

Ah, i see

twilit smelt
#

glad i invested in fancy mutexes

#

now i dont have to feel guilty about wasted space from spamming them everywhere, cuz theyre all just a single pointer

#

would have been tempted to do broader locks for certain things otherwise in order to save space

twilit smelt
#

in old mintia i had a goal of 1mb to run in multi user headless mode

#

minimum

#

512k is my goal this time

#

at least for uniprocessor

#

the smp build might not fit in that

#

but if you have an smp system you probably have more than 512kb ram.

queen torrent
#

making an smp computer with only 256kb ram just to spite you

maiden lance
#

Dual-core Arm Cortex-M0+ processor, flexible clock running up to 133 MHz
264kB on-chip SRAM

#

it does not have a real MMU tho

twilit smelt
#

well the mmu is kinda important for even hoping for 512kb

#

need pervasive swapping for that

white valley
#

based entirely on swapping

twilit smelt
#

huh

white valley
#

have all the features of a modern OS

#

but you only have 2 pages of memory

twilit smelt
#

that does not sound possible no

white valley
#

it doesnt have to be fast, it just has to work

glass sparrow
#

most of the modern features are to be faster

white valley
white valley
#

so it should create a facade of having an actually big virtual memory space

twilit smelt
#

assuming youre not counting page frames required to be permanently resident like architecturally

#

nvm

#

its not possible no

white valley
#

cant you swap in the page frames

#

lol

#

it'll require software TLB refill anyways

twilit smelt
#

and the disk driver

#

u have 1 theoretically swappable page frame

icy bridge
#

you need at least one actual page to hold the data that gets swapped in/out, and I don't think all the memory management and disk I/O code combined could possibly fit in a single page

heady bobcat
#

possible? maybe, but very impractical and not a good idea

white valley
#

this would be for a custom arch so in theory you could make disk io easier

teal trench
icy bridge
twilit smelt
heady bobcat
#

yeah, in that case, hard no

icy bridge
icy bridge
#

then code size is less of an issue yeah

#

but I still don't think it's really possible

#

the memory manager itself requires dynamically allocated data that cannot be paged in/out

twilit smelt
#

u also need to fit everything depended upon by the memory manager in the permanently resident page frame

#

so the schedulers in there

#

and you have "modern os features" so its a multithreading scheduler with priorities and fancy policies

white valley
#

ok hear me out

#

if you keep a cache

#

and have that cache be 16 kib or something

#

you could technically use it to store extra code

#

by swapping it in, putting it in the cache

#

and swapping it out without evicting the cacheline

twilit smelt
#

this discussion is getting like annoyingly contrived

#

specifically cuz somehow that 16kb cache doesnt count as memory even though its literally memory so you immediately invalidated your original premise

white valley
#

damn...

#

true

twilit smelt
#

"its not possible"
"what if you add more memory"
well yeah then i guess its possible. but thats like. not interesting

acoustic sparrow
#

on a lot of architectures a single instruction can require more than one page to execute in the worst case

acoustic sparrow
#

then its boring

raven drift
#

There is definitely hw that needs to operate on more than one page to work though

icy bridge
#

fair, still eats up 1/8th of the page though

raven drift
#

yea

#

it's not feasible on real archs

#

on custom archs it's feasible because you can just add magic to the arch to do it

#

but as pitust said, it's boring in that case

white valley
#

by custom arch i didnt mean just adding features to bullshit around the challenge

#

just something that removes hardware impossibilities without trying to make it easier

twilit smelt
#

the absence of this check would have allowed accesses to arbitrary kernel memory if i didnt notice it lol

mortal thunder
#

do privileges > OS_PRIVILEGE_MAX allow such accesses or what

acoustic sparrow
#

although its mintia2 and i mean. the competition is 6th to 8th march

dense vigil
#

I expected more from the man himself

white valley
#

reject version control

#

return to tarball patches over email

raven drift
#

do it like ncurses and publish patches in tarballs

#

I think they have a repo now but they unironically still did it like that a few years ago

twilit smelt
#

often I just run into something while doing smth else and fix it right then and then it goes into one commit

dense vigil
#

This would never fly if you were doing osdev on a team

#

So it's useful to keep a commit hygiene especially if u don’t have commercial experience

twilit smelt
dense vigil
#

Im not sure why that matters, in this case its a bug fix and a random new feature both in one commit

twilit smelt
#

So what

#

It's my project lol

dense vigil
#

I thought u were more serious about it is all

twilit smelt
#

This is trivia

#

This entire part of the project is a boring formality anyway basically

#

Actually writing down stuff I already knew how it'd work for like 2 years

raven drift
#

why are you doing it if you consider it boring?

twilit smelt
#

Bc it's a prerequisite for less boring parts

#

(Memory manager and IO)

#

By "this entire part" I meant the bucket load of process management syscalls

#

The parts that are rly new to me are the smp scheduler (already done), turnstiles (done), and then aping UVM concepts for the memory manager and also designing async STREAMS-like junk for character devices in the IO system

#

Those are the fun parts

digital pivot
#

was scheduler an interesting part?

twilit smelt
#

Yes

hybrid condor
dense vigil
#

is this an attempt to cope

twilit smelt
#

on whose part

dense vigil
#

cogolein

twilit smelt
#

Doubt it

#

Think they r criticizing me

dense vigil
#

ohh lol

#

maybe

twilit smelt
#

It would have been more hygienic to do two commits for that but I also literally don't care and don't think it mattered

dense vigil
#

I do patch bombs sometimes

#

when im too lazy to interactively rebase so that it appears as a series of concious changes

digital pivot
#

do you write big commit messages?

dense vigil
#

generally not

digital pivot
#

or does it make sense to write big commit messages?

dense vigil
#

when its warranted for

#

like if it's uncler for example why something is removed, how a bug is fixed, what the feature added is for etc

digital pivot
#

so if your project is "serious" they generally should be detailed?

dense vigil
#

you will thank even yourself for that later when u do a blame to figure out why some line of code was added

digital pivot
#

that how i udnerstood cogolein's message

dense vigil
#

or at least atomic

digital pivot
#

you can open a commit and check if any comments changed

dense vigil
#

that works too

twilit smelt
#

Obsessing over commit hygiene would prob discourage me from making tiny improvements (adding comments, bug fixes that affect a few lines, etc) where I notice them in the middle of doing other work cuz it'd be way more annoying

#

So this way is probably best for my hobby project

twilit smelt
#

Also never worked professionally as a programmer before

#

I just care minimally about like robustness and not littering my kernel with trivial DOS attacks and oom panics and stuff

#

Which everyone should

#

imo thats like half of the difficulty of the engineering parts lol

#

or more

dense vigil
#

fair fair

twilit smelt
#

I think most ppl get lost at the part where half of everything has to return a status and everything that calls it has to handle it when that status is an error

#

Cuz that's tedious and they just want to "get it working"

white valley
#

@dense vigil honestly i find it hard to do small commits when starting a project

twilit smelt
#

But then that precludes doing other interesting robustness work after you wrote tens of thousands of lines without worrying about error statuses or with highly inconsistent/ineffectual handling

#

So it just snowballs until it's hopeless forever

#

in most hobby kernels

white valley
dense vigil
#

but u gotta remember

#

they dont have to be small literally

#

they can be 200k lines of code

#

if it adds one driver for example

twilit smelt
#

That I think most ppl don't think about cuz they find it boring and that ends up being the root cause of their kernel being super unstable way later

white valley
dense vigil
#

serenity vibes

twilit smelt
#

Or redox

white valley
#

lol

twilit smelt
#

I thought of redox

white valley
#

sadly every part of the call stack has to handle the possible error(s) of the one above it

#

which isnt especially hard to code

#

but people just dont care

#

theyd rather panic in the lowest layer than propogate that error

twilit smelt
#

Even if you handle error statuses perfectly, error case design can end up being rly intricate and easy to fuck up especially with like memory managers when swapping gets involved

white valley
#

if you dont have the ability then you just end up speedrunning to a fancy GUI that shits itself when a program touches it wrong

white valley
twilit smelt
#

I'm still unaware of any with a full page swapping impl other than minoca and old mintia

#

It's a very rare feature

#

Both of those two also have a paged kernel heap

#

Only old mintia has paged kernel code, about half of the kernel's pages were swappable

#

For whatever use that is

#

Lol

twilit smelt
warm pine
#

But certainly the swap out logic is there and thoroughly tested and extends to the page tables themselves

glass sparrow
#

hobby OS userland does not handle OOM well much of the time either

#

like mlibc, which panics on a mmap returning ENOMEM for its malloc implementation, even when the rest is fine

dense vigil
#

very few userspace programs need to handle oom at all

glass sparrow
#

thats a choice for the userland program to make, if a game wants to panic on OOM, thats their choice

#

but core libraries and stuff should handle it fine

raven drift
#

Nobody made a bug report for this so far and changing it requires only a few lines of code

glass sparrow
#

yeah for sure

#

the point is not that mlibc sucks and it is unfixable

#

the point is that these things usually are not checked against and can go undetected for a while in hobby OSes

#

ill submit a bug report

warm pine
#

solaris fireengine also doing this model

#

i believe there is a strong case for this approach on a per stream stack basis

#

i believe it is adequate to have serialisation on that granularity because a) of the asynchronous nature of processing, so there's no blocking to sadden your eyes over another thread not being able to do processing, and b) that plus the fact that it is now a universally acknowledged good that processing of a packet on all levels of a TCP/IP stack (and this goes just as well for other stacks) should happen on the same core, you'd really only be facilitating between-core parallelism by having a finer domain of serialisation

twilit smelt
#

"enqueuing" "enqueueing" "queued" "queue"

warm pine
#

that's a bit of a stinker

#

"enqueuing its packet, the enqueuing"

twilit smelt
#

I had a goofy idea for implementing drawing in a stacking window manager

#

Basically have a mask bitmap the size of the display that starts out with all the bits outside the redraw area set, then to redraw each element you grab a nibble from the mask bitmap and use it to index a 16 entry table of routines for redrawing that type of thing and they inline plotting the pixels or do whatever other thing (probably automatically generated for like drawing fonts and stuff, handwritten for lines and solid rectangles). You set the corresponding bits in the mask bitmap when you're done doing this and repeat until you reach the back

#

U skip any 0xF nibbles

#

You'd probably not have this as a generic loop and instead dispatch to a routine specific to that element type because if it's like a line it might have special knowledge that it can skip a bunch of nibbles

#

Or it might have a better way just generally

#

This would also be low level and you'd still have clipping regions and stuff on top

#

You'd just use them to initialize the mask bitmap

twilit smelt
#

The dog on the left barks with hitler's voice

green pelican
#

he will build a kennel that will stand for 1000 years

twilit smelt
warm pine
twilit smelt
#

what does it do with multiplexer modules

warm pine
#

and in general? solaris internals doesn't cover it at all

twilit smelt
#

one of the papers you linked talked about eradicating multiplexer modules by duplicating more stuff iirc

warm pine
#

oh yeah, that's exactly right

#

give me 1 second i'll get a diagram

dense vigil
#

will do u have the links to all those papers u have read to make mintia stored somewhere?

twilit smelt
#

best bet would probably be from:hyenasky has:link in this discord lol

#

the wiping of the old mintia thread compromised that though

dense vigil
#

hmm ill try lol

warm pine
#

i've misplaced my phone which is where the diagram is stored -_-

#

one second and i'll redraw it

dense vigil
#

fadanoid maybe u have something like that as well?

twilit smelt
#

also a lot of it was books

warm pine
#

actually maybe i can even find a diagram online, 1s

twilit smelt
warm pine
#

note the IPv4/IPv6 devices that are terminated onto the bottom of the STREAMS stacks for TCP/UDP sockets. the IPv4 and IPv6 modules, by contrast, are single multiplexor modules which terminate onto the NIC device. they are either totally mutually excluded on i'm not sure of a per-queue-pair or per-queue basis

#

so they are a severe limiting factor, not only for multiqueue NICs where the receive side is limiting, but also on the transmit side because every TCP or UDP packet has to go through them, and at best it's serialised per-queue and there's only one tx queue

#

compare that to this

#

here the "anchorage driver" is basically equivalent to that IP multiplexor, and in this case it's also serialised collectively with the routing, ARP, ICMP, and fragment reassembly module. but its tasks are dramatically reduced: for incoming packets is limited to either dispatching to ARP/ICMP/fragment reassembly, or to looking up which TCP or UDP streams stack the packet should go to, and putting the packet to that stack

#

while for outgoing packets, to consulting the ARP cache on which ethernet address to destine it to for a given IP. all other IP responsibilities (encapping/decapping the IP header, fragmenting, dealing with path MTU, checksumming, general sanity checking) are done by the individual IP modules within a TCP or UDP streams stack

#

so there is a case of slight violation of layering in the anchorage driver (it has to understand the basics of IP, UDP, and TCP - enough to know which streams stack to direct a packet to) in order to get away from a multiplexed architecture

#

i recommend btw that you do do a mintia tcp/ip stack, not just because it's a cool opportunity to exercise STREAMS, but also because it will probably be very helpful for your career prospects

twilit smelt
#

Yeah that's the plan

#

Probably for a real nic on the amd64 port rather than a fake one on xrstation

warm pine
#

one thing i am glad we have now, the benefit of hindsight

#

there are some papers from the early 90s around STREAMS and networking that get themselves tied in knots trying to figure out an ultra-fine-grained locking approach

#

but it's known now that the better thing is to just to try to localise processing within a single connection, at all levels of it, to one core - and then this becomes a nonissue because per-stream locking is adequate (maybe per-direction would be better but that's still in the same league of complication)

green pelican
dense vigil
#

thats cool

warm pine
#

i think it would be a nice gesture and maybe even helpful for myself if i did cite everything i read contributed to such-and-such a design or whatever, it's hard to identify exactly what is the basis of everything i've added, but certainly i think it would be a great thing to try

dense vigil
#

that would be amazing indeed

mortal thunder
#

that seems like massively slower for no reason

#

in other news, my osdev urge might be coming back

#

now that i have a relatively comprehensive explanation of paging in windows i might actually do something good

mortal thunder
#

for every pixel that has a non $F nybble

#

that 20 something mhz XR/17032 CPU will have massive trouble dealing with that

#

(unless you somehow made jumps take one cycle)

twilit smelt
#

You're also overestimating how often this would need to be done - for something like filling nicely aligned subrectangles you'd just do a memset

#

This is for drawing inbetween borders with arbitrarily convoluted clipping regions

mortal thunder
mortal thunder
twilit smelt
#

A nibble would track 4 pixels (bc 4 bits) not 1 pixel and you look up a table of function pointers with the value of the nibble and these just inline plotting the pixels with a provided color and base pointer

mortal thunder
#

there is a limit to the convolution of clipping regions so i think a basic cookie cutter mechanism would work fine

twilit smelt
#

You also wouldn't do a 32 bit load for each nibble... obviously? You'd do one load and then shift each nibble into place

#

This would all be handwritten asm

mortal thunder
#

i don't understand the ultimate goal of doing this though

twilit smelt
#

And unrolled to hell

twilit smelt
mortal thunder
#

how do you plan on requesting a draw anyway

#

do you plan on sending a message to the refreshed window with the regions to refresh? do you plan on storing a bitmap for each window?

#

not sure how you envision that

mortal thunder
twilit smelt
#

I'm doing a tree of elements server side that the client sends batched ipc messages to update; one of these can be a bitmap through a shared memory window but most of them would be predefined things like lines and rectangles and text

mortal thunder
#

and I suppose that each element has to check, for each pixel that it draws, whether it's inside the clipping region?

twilit smelt
#

The server would redraw without involving the client by using this tree; the client can also request a redraw of a region by sending a dirty message

twilit smelt
mortal thunder
#

so... what do you check instead?

#

i don't quite understand your nybble idea

twilit smelt
#

Read it again then

mortal thunder
#

so for each 4 pixel group you load its corresponding nibble and then index it into a table of routines

#

that nibble corresponds to one graphics primitive such as lines, rectangles, and text?

#

for filled rectangles that seems like it would work fine (the routine should be simple) but what about arbitrary (i.e. not vertical/horizontal) lines, text, and generally other hollow shapes

#

you'd need to somehow cache the info used to draw that text

twilit smelt
#

You inline this in the routine

twilit smelt
mortal thunder
#

what happens if you want one pixel to have one color and another pixel to have a different one, in the same group represented by that nibble

twilit smelt
#

Give a more explicit example of a situation where you'd want this

twilit smelt
mortal thunder
#

DrawLine(50, 50, 50, 100, BLACK);
DrawLine(52, 50, 52, 100, BLUE);

#

for example

twilit smelt
#

Then those are two different elements

mortal thunder
#

or wait i swapped the coordinates

mortal thunder
#

or somehow otherwise reuse that buffer

#

(im a bit tired so excuse me if im misunderstanding)

twilit smelt
raven drift
#

it seems much faster to do a masked store than anything involving indirect jumps

mortal thunder
#

Tbh, yeah

raven drift
#

just have a mask bitmap with the same size as a AABB around the clipping region and do masked stores

#

or use tiles that split the clipping region into multiple parts

mortal thunder
#

that got me thinking

#

load pixs from 4 pixels of framebuffer (ideally you'd have a copy in RAM or fast MMIO to the fb)

load mask from keepmask[nybble]

pixs &= keepmask[nybble]
pixs |= colorsmask[nybble]

store pixs into the framebuffer

#

this could be easily doable on the framebuffer in xr/stations since it uses 8bpp iirc

#

so one 32 bit word corresponds to 4 pixels already

twilit smelt
#

Btw I didn't get annoyed bc u were criticizing my idea I got annoyed bc u didn't understand it before u started confidently criticizing it lol

mortal thunder
#

and you just have to compute the colorsmask table

#

i suppose

twilit smelt
#

Reads from framebuffer are bad and im not wasting 768kb on an in memory copy

#

The whole point is that there are memory constraints

mortal thunder
#

okay cool

mortal thunder
#

how big is your fb

#

oh wait its 1024x768

#

right

twilit smelt
#

1024x768 @ 8bpp

#

If there weren't memory constraints I'd just do a compositor like every other hobby window system

mortal thunder
#

so masked stores dont seem like theyd work in that fashion

#

that's probably the whole point of why you wanted to use indirect jumps

raven drift
#

what is "like every other hobby window system"? I've probably seen one or two good designs of compositors and plenty of bad ones meme

mortal thunder
#

it's still slow as hell and I'd argue it might end up slower than a read mmio from the framebuffer

twilit smelt
#

I actually think if you unrolled the outer loop it'd be pretty fast

mortal thunder
#

unless read mmio isn't at all possible

mortal thunder
raven drift
#

why are you imposing these memory constraints?

mortal thunder
#

1989 workstation larp i think

twilit smelt
raven drift
#

ah

twilit smelt
mortal thunder
#

i want to do a stacking WM for boron as well but mostly because i didn't do it before

twilit smelt
#

Represented with spans in the higher level code maybe

#

Also this is on a per element driver basis, so if there was a better way for some particular thing then you could do that instead lol

raven drift
#

if you have clipping regions that are much smaller than their AABB, a good strategy is splitting them into tiles

#

then you can arrange the tiles in memory such that the entire tile is prefetched when writing it out to the framebuffer

#

and you can write to the framebuffer in a linear fashion

#

which is advantageous when CPU store buffers are used

mortal thunder
#

maybe he wants a round clock for example

#

you can split that into AABBs or express it in scanline spans or stuff like that

twilit smelt
#

I don't know much about raster graphics programming yet

#

I need to figure it out before I do my window system cuz I don't want it to suck

twilit smelt
#

Prepare to die..

mortal thunder
#

my goal wasn't really to criticize tbh

#

i just wanted to see the full picture because the incomplete picture misled me into useless concerns

night needle
#

lol how is this criticizing

safe hollow
twilit smelt
safe hollow
#

to avoid reading from the framebuffer

mortal thunder
#

yeah this is how i'd understand it

mortal thunder
#

because the picture was incomplete in my view

twilit smelt
safe hollow
# safe hollow to avoid reading from the framebuffer

so for the worst case 0b1010
you're writing a byte, skipping one, then reading another
since you do not know what's in the 0 bytes and you do not wanna overwrite it
but wouldn't this in hardware, either generate a bus transaction for each byte if uncached, or a RMW if cached (kinda defeating the point)

twilit smelt
#

You can do byte stores

#

And bc goofy 89 mips workstation style caching setup, cached mappings are all essentially write-combine. On a later system you'd have that as an explicit setting

#

but that's how it is there and so that's how the framebuffer is mapped essentially

safe hollow
#

if you have a 32bit bus you're using a quarter of it (in this worst case scenario), which isn't terribly bad

#

since you have no burst transfers etc

#

but i think ram burst transfers were a thing in 1989 already

twilit smelt
#

You're right that there's an rmw here

#

It wouldn't be too difficult to add a real write combine mode

#

Or assume reads from the fb on cache misses won't be that bad which may be the case in 89 ish

safe hollow
#

i was thinking to avoid memory messes by always recomputing everything in that padded region, so you can do 32bit writes without issues

#

but looking up what is below might be expensive

twilit smelt
#

Would be annoying to make it capable of writing individual bytes

#

And also unrealistic

#

The mips workstation I yoinked the cache design from certainly couldn't do that

safe hollow
#

from what i know you couldn't eliminate the rmw entirely

#

since at the very least the memory controller has to read the row, modify it. and write it back

#

if you write continuously it's amortized as the rows are 256 bit or greater

acoustic sparrow
#

so it would not be that out of place

twilit smelt
acoustic sparrow
#

ah yeah i guess that would only help if you had a compositor

green pelican
#

although prefetch does read the memory so maybe not

acoustic sparrow
#

partial cache flushes sound quite annoying

twilit smelt
#
#

disk image dump for unix system v/860

white valley
#

lol

#

whatever that trade secret information was has probably become wide & trivial knowledge by now

acoustic sparrow
#

lol

#

they could, maybe, say that IF you use their software THEN you must not share their trade secrets

#

since trade secrets aren't copyrightable

twilit smelt
#

typical unix inferiority!

#

a fixed size swap partition that takes up 25% of the disk space

#

smh

acoustic sparrow
#

fixed size swap is more efficient tho

#

unless you can allocate contignous disk sectors

twilit smelt
#

says who

acoustic sparrow
#

which i dont think fses could at the time

twilit smelt
#

uhh

#

just scan for an appropriately sized area of clear bits in the disk bitmap

acoustic sparrow
#

though not guaranteed

twilit smelt
#

cut it in half until u find one and then u can get maximally contiguous extensions

acoustic sparrow
twilit smelt
#

compute is not the problem area

#

with swapping

acoustic sparrow
#

fair

#

it also takes less ram

#

by like 10 bytes or w/e

twilit smelt
#

doesnt linux still do a fixed swap partition typically

acoustic sparrow
twilit smelt
#

macos and windows both do a file by default

#

mach has always had a file

#

traditionally at /private/vm/swapfile i think

acoustic sparrow
#

interesting

twilit smelt
#

but idk where it is in modern macos

acoustic sparrow
#

probably in /System and behind TCC

#

ah /private/var/vm

#

thats not even that different from mach

twilit smelt
#

thats probably what it was in mach and i just misremembered

#

lol

acoustic sparrow
#

ah no its in /System/Volumes/VM now

white valley
#

thats weird

twilit smelt
#
$ ls -l /System/Volumes/VM
total 10487808
-rw-------  1 root  wheel     1048576 Feb 11 05:49 kernelcore
-rw-------  1 root  wheel  1073741824 Feb 12 03:38 swapfile0
-rw-------  1 root  wheel  1073741824 Feb 19 13:55 swapfile1
-rw-------  1 root  wheel  1073741824 Feb 21 02:50 swapfile2
-rw-------  1 root  wheel  1073741824 Feb 14 00:56 swapfile3
-rw-------  1 root  wheel  1073741824 Feb 23 09:52 swapfile4
#

on my mac

white valley
twilit smelt
#

what is kernelcore

#

and why are there 5 swapfiles

white valley
#

though i have stopped using swap after upgrading to 32 gigs

acoustic sparrow
white valley
acoustic sparrow
#

instead of resizing a single swpafile, they make N swapfiles

white valley
#

very suspicious

acoustic sparrow
#

allocating more as needed

warm pine
#

svr4 or earlier?

twilit smelt
#

with regards to what

#

the i860 unix?

acoustic sparrow
warm pine
#

that one, yeah

twilit smelt
#

its svr4

acoustic sparrow
twilit smelt
#

mark lucovksy told me they (the NT team) were in close contact with the guys doing the svr4 port to the i860 at intel

#

and they shared fixes for weird chip bugs

#

early on in the process for both of them

#

in '89

#

i think he also mentioned they had a diff philosophy toward the chip bugs that he disliked

#
E.g., imagine interlocked operations having some edge condition quirks… So OS level code using these instructions would have to run a certain way, to avoid quirks — e.g., operation only works if operands 1 and 2 have identical address bits in position 24 and 28. Dave would tell them to fix their shitty CPU. An Intel Unix porting engineer might just ignore it, or panic if they see this, or work around it.

Dave would make some compromises, but not many, and definitely not to appease Intel
#

this was before he got in too much of a politicsposting trance to answer my dms :(

acoustic sparrow
#

presumably to make sure it can write the kernel crashdump

white valley
#

what the fuck

twilit smelt
#

he probably made that up based on a vague recollection of an actual i860 chip bug

#

probably in the cache management stuff

white valley
#

still insane even if it wasnt exactly the same thing

#

also how has ur elbow been

twilit smelt
#

fine, i stopped using the splint after like day 2 bc it stopped hurting lol

#

range of motion is still bad and feels weird/painful if i fully extend or contract my arm

green pelican
#

the splint is there for more than pain management halfmemeright

#

you dont want your bone to heal at an angle

twilit smelt
#

its probably fine for this specific type of break

twilit smelt
#

its a crack in the bulby part on the end of my radius

#

that goes into my elbow

#

theres no misaligned/angular healing potential there

green pelican
#

i might be overcautious about these things i suppose

#

good that its hurting less though

twilit smelt
#

so i dont think i need the splint and the range of motion problems are probably from overextended tendons that are still healing or something

green pelican
#

i fell flat on my ass last month and managed to fuck up every tendon in my left arm lmao

twilit smelt
#

that was how i broke my elbow

green pelican
#

didnt have full range of motion for 2 weeks, although that was a sprain not a break

twilit smelt
#

i slipped on ice while taking out the trash at like 3am

green pelican
#

oof

white valley
#

why does it get closer to 12 am each time you mention it

green pelican
#

when i was 14 i had to take the bins out when it was icy and managed to end up squashed under a trash can

twilit smelt
#

LOL

green pelican
#

spent like 3 minutes feeling sorry for myself before a neighbor saw me and pulled the bin off me meme

white valley
#

damn

#

where i lived previously had stairs in front of the apartment and i would keep slipping and falling there

green pelican
#

it wasnt particularly heavy but having the wind knocked out of you + it being really slippery meant i was stuck lol

#

oh yeah icy stairs are the worst

white valley
twilit smelt
#

someone walked by shortly after i recovered and stood back up and was looking at me and im p sure he didnt see me fall but he may have heard my involuntary pain yell

#

which was like AHHHhghhhh fuuuckk

white valley
#

spent the whole day like that

green pelican
white valley
twilit smelt
#

i fell down the stairs in my familys house last year and i made the same noise and nobody came to help and it was because they thought i was playing with the cat because i make weird noises while i play with the cat

green pelican
#

it was a very long flight of stairs

white valley
#

your wording makes it sound like they died

green pelican
#

thankfully everyone was mostly fine

white valley
hybrid condor
white valley
twilit smelt
hybrid condor
#

¯_(ツ)_/¯

twilit smelt
#

i made a copy and opened it in a hex editor and its just a bunch of newline bytes and zeroes

#

look at that lonely newline

white valley
twilit smelt
#

it is literally a ten

white valley
#

yes you got the joke

#

congrats

twilit smelt
#

steganosaurus

#

or whatever u call it

white valley
#

how many digits are SSNs

acoustic sparrow
#

afaict

#

or at least stacktraces

twilit smelt
acoustic sparrow
twilit smelt
#

who uses them to...

white valley
#

this reminds me of that moment in breaking bad where walter white's like

#

"which element does this?"

#

and jesse is like

acoustic sparrow
white valley
#

"aaah wire"

acoustic sparrow
#

lol

#

its not for kdp

twilit smelt
#

i stopped drinking aspartame a few days ago and i feel great

#

i also stopped hitting myself in the head with a mallet 15 times after waking up

#

but i think it was the aspartame

hybrid condor
#

Feels like we're talking about different things?

acoustic sparrow
#

that's not strictly speaking KDP though? afaict

hybrid condor
#

not necessarily, a kernel dump is obviously about the kernel, but crash dumps can also be collected for apps when they crash

acoustic sparrow
#

is that also part of this component of the kernel coredump mechanism?

hybrid condor
#

didn't get the question, but this thing is spread across different components

acoustic sparrow
#

yeah makes sense

hybrid condor
twilit smelt
#

it stopped hurting weirdly quickly but yeah it was pretty painful the first like 2 days

digital pivot
acoustic sparrow
digital pivot
#

hmmm makes sense i guess

digital pivot
heady bobcat
#

does the swapfile need to have a name in the filesystem? I don't understand why it wouldn't make sense for it to be opened as an O_TMPFILE or equivalent

twilit smelt
#

probably cant name that about modern NT either

#

i can tell you it was at /mintia/pagefile.sys on old mintia though

twilit smelt
digital pivot
hybrid condor
#

this particular detail might have changed in the past so it's understandable not to know for sure

#

iirc on non desktop targets the path might be different

acoustic sparrow
white valley
acoustic sparrow
#

in place swapfile resizing is more code than just making more swapfiles, assuming you handle multiple swapfiles already

white valley
acoustic sparrow
#

kinda is

white valley
#

is using vulkan a disadvantage

#

opengl has less code to do the same thing

digital pivot
white valley
acoustic sparrow
#

vulkan is more code because it lets you do more

#

and having 3 swapfiles of 1 gig each vs one swapfile of 3 gigs is the same thing

digital pivot
acoustic sparrow
#

dont think so

digital pivot
#

contiguous large regions will be faster to load app working set

#

i think windows has a separate page file for swapping entire app working sets

acoustic sparrow
digital pivot
#

maybe on hdds it's more important?

acoustic sparrow
#

on nvme, the only thing is you submit less commands

#

on hdds yeah it matters more

#

swap on hdd is a lot worse

#

like in general

digital pivot
#

ig on ssd is faster too, just not as noticeable?

acoustic sparrow
#

actually hmm

digital pivot
#

sequential reads

acoustic sparrow
#

maybe you can submit less commands

acoustic sparrow
#

so long as you read in multiples of a page

#

it doesnt matter at all afaict

acoustic sparrow
twilit smelt
#

Because it's easier to shrink

acoustic sparrow
#

sounds like the same procedure

#

evict pages in the to-be-deleted swapfile

#

then remove

twilit smelt
#

evict pages from the swapfile

#

how

acoustic sparrow
#

force them to be faulted back in

#

and do not allow pages to reenter it

twilit smelt
acoustic sparrow
#

wait so how do they shrink page files?

#

just, if you rng to get lucky?

#

that sounds like a bad approach

#

or else how do you shrink a swapfile?

twilit smelt
#

its like a little higher than chance that if the commit usage dropped significantly below the commit limit, the top part of the pagefile will be unused again and you can chop it off

twilit smelt
#

anecdotally from mintia experiments it works decently

acoustic sparrow
#

let's say theres a broken program which does while (true) allocate page()

twilit smelt
#

OS/2 would actually do what youre talking about though - actually it would go even further and would defragment the pagefile in-place and other weird shit

acoustic sparrow
#

until it crashes

#

then if you allocate a page but not use it

#

that moves the minimum shrink size up

acoustic sparrow
icy bridge
#

isn't a very good strategy

twilit smelt
#

thats not what i said though

acoustic sparrow
twilit smelt
#

you check to make sure its unused before you do that lol

icy bridge
#

ohh ok

#

but what if someone's explicitly asking the kernel to shrink the pagefile

acoustic sparrow
#

imo cleaner to actively clean it

acoustic sparrow
twilit smelt
#

here and onward

#

is the relevant code in old mintia lol

acoustic sparrow
#

idk sounds ugly

#

and also its suboptimal

twilit smelt
#

the primary issue is that youd need a back-map from pagefile slots to their users

#

and then thats more wired information sitting around

acoustic sparrow
#

ehh

#

not really?

#

just go through every user

twilit smelt
#

u understand thats obscenely slow right

acoustic sparrow
twilit smelt
#

even at like a 15 second interval

#

i mean the locking for that would be crazy and would hold people up left and right

acoustic sparrow
#

:^)

#

also, lets say you have 1 gig of ram, and you want to sweep it all in 15 seconds, that's 18k pages per seconds (ish). thats not like, a lot

#

especially since the critical path is just checking if a page belongs to a swapfile above the watermark

twilit smelt
#

ur welcome to make this work well in mintia2 once the new vmm is done

#

id love to receive that PR

#

then i can put on my resume that i managed a crowdsourced project

#

only rule is ur not allowed to use a global lock

#

anywhere

acoustic sparrow
#

okay thats fine ill have 16 global locks

#

(and then address % 16 because thats definitely how you break up a global lock)

twilit smelt
#

that works sometimes!

#

i have two of those in my new Ke

#

arrays of spinlocks indexed by hash of address

icy bridge
#

yeah I was gonna say just using the address itself as hash is a bad idea

acoustic sparrow
#

yeah that makes sense

icy bridge
#

but hashing the address is great

#

I believe WebKit uses that to have one-byte mutexes

acoustic sparrow
#

yeah

#

actually

#

they do weird things

twilit smelt
#

i say almost bc my mutexes are 4 bytes (a pointer size)

acoustic sparrow
#

(they have an externally allocated hashtable for dynamic bookkeeping)

twilit smelt
#

the other one is for guarding the existence of balanced work queues

acoustic sparrow
#

okay so anyway going back to it

#

therers probably even cheaper ways to do it than that

#

like abusing rcu or something

twilit smelt
#

i dont have rcu cuz i dont know of any satisfactory way to do it (bc i havent looked, not bc it doesnt exist)

acoustic sparrow
#

ah

twilit smelt
#

keyronex's way wouldnt work for me

acoustic sparrow
#

have you heard of my rcu impl meme strat?

twilit smelt
#

i have not

acoustic sparrow
#

which allows for partial rcu without blocking scheduling

acoustic sparrow
#

then if you interrupt inside of that

#

you software emulate the instruction that bumps the refcount

#

and then make sure that every cpu isnt in the critical section before freeing (which isnt super hard to do, either by spamming out ipis, or some clock stuff or whatever)

twilit smelt
twilit smelt
acoustic sparrow
#

yeah thats the cool thing about rcu meme edition, it doesn't care!

#

you just restart the rcu section

#

paging safe!

#

please dont actually implement this

twilit smelt
#

i think your way is bad because you basically guarantee unbounded numbers of pending frees whenever the system is even vaguely busy

acoustic sparrow
twilit smelt
#

ok now theres unbounded starvation

#

:^)

acoustic sparrow
#

it's only unbounded if one cpu dies

#

hmm actually no its hard unbounded

twilit smelt
#

never question my intuition

#

im incapable of rigorously proving anything but my intuition is infallible...

twilit smelt
#

im the pinnacle of engineer type who cant do any math, except better bc i recognize that that does mean im stupid

acoustic sparrow
#

you can definitely fix the unbounded starvation

#

tho

twilit smelt
#

it's funny I've been edging finishing Ps for like 3 months now

#

if I had late 2021 energy levels I'd have gotten it done and moved on in literally two days

#

I'm so nerfed now

#

My energy levels have been through the floor for like a year and a half

#

I do like

#

3 hours of work and im like "okay that's enough for the next two weeks"

dense vigil
#

That's probably just burnout

#

But same

twilit smelt
#

It's not burn out on the project it's just depression in general

white valley
#

have you tried forcing yourself to work on it

twilit smelt
#

I can't force myself to do anything lol

#

Never been able to do that

green pelican
#

"Fuck it we ball"

#

Idk take a break, do something totally unrelated for a few days at least

white valley
green pelican
#

Play fortnite for 14 hours a day

#

Message schizophrenics on discord with random number sequences

white valley
#

buy 2 more screens

#

one of them is going to have subway surfers

#

the other one is going to have fortnite gameplay

#

and the main one will be the one where you work on MINTIA

twilit smelt
dense vigil
#

Do something totally unrelated for 10 years

sterile frost
#

i hate random bursts of motivation

#

i wish i could just do stuff

mortal thunder
#

me too

twilit smelt
#

u can visually see the diff between risc and cisc instruction encoding looking at mintia kernel binary in a hex editor

#

u can see the 4 byte aligned instructions of the xrstation build (top) and the not-aligned not-4-byte instructions of the fox32 build (bottom)

dark shard
twilit smelt
#

i have a fantasy that ill fix a subtle bug and then the next day i get an email saying "omg we were waiting to see if you would find and fix that incredibly subtle bug! youve passed our test we want to give you a $300k/yr senior position on our kernel team! when can you start!"

raven drift
#

applying to kernel or systems programming positions is a more realistic path towards that goal meme

acoustic sparrow
raven drift
#

back in 2021 when the SE job market was crazy recruiters definitely scanned github

#

but that "we saw that you contributed to project X, don't you want to join FAANG company Y" spam definitely decreased

acoustic sparrow
#

but that's slightly different

raven drift
#

yea ofc they didn't monitor individual bugs

acoustic sparrow
#

yeah

mortal thunder
#

but it's not happening unless i put in the effort

twilit smelt
#

largely bc i had never implemented a fancy vmm before

mortal thunder
#

not a good sign for me

#

I suppose I should just sacrifice quality for now so that I can move on?

#

and then improve later?

warm pine
# mortal thunder i have a fantasy that the windows nt memory manager will magically click in my b...

my first attempt, i started, got spooked by the big change in the concepts, and reverted to what i knew - though i think i had already imported the NT style reference count and MDLs, which after deploying simply felt like a much more sensible way to do things than the quite complex approaches some systems use, with awful per-page "this page is being written back" locks and a general lack of clarity compared to the refcnt concept

#

later that year i started building one again, then i threw out half of it and started testing the whole thing in userland simulation

twilit smelt
#

An underappreciated reason that the DEC alpha kicked ass wasn't just microarchitectural superiority but like

#

They laid it out by hand, it was the last major cpu to be laid out by hand

#

Aside from particular important pieces and the high level overall layout that's literally impossible to do now because of the complexity of modern chips

acoustic sparrow
#

we now have computerized ai hands that can do the equivalent of placing every transistor by hand though

#

since somewhat recently

tiny swallow
twilit smelt
#

would you believe me if i said this is the first 'segfault' ive gotten in like 2 months

white valley
#

after a certain time you just grow unable to write simple memory bugs that result in segfaults

twilit smelt
#

ok:

#

Ps (process management) is done

#

new mintia:

     608 ./PsGroup.jkl
    1791 ./PsProcess.jkl
     371 ./PsInit.jkl
    1187 ./PsThread.jkl
     788 ./PsJob.jkl
    4745 total

old mintia:

     704 ./PsProcess.df
     569 ./PsInit.df
     428 ./PsOSCalls.df
     797 ./PsJob.df
     840 ./PsCreate.df
     141 ./PsUserEntry.df
     251 ./PsThread.df
     375 ./PsDelete.df
    4105 total
#

ppl who said old mintia was only that many lines of code bc dragonfruit wasnt dense enough are in SHAMBLES rn

#

boom

#

next up is IO system

#

ill be at base level 3 after io manager is done, and then ill be working on base level 4 (which is all the hardware drivers)

#

this is basically a topological sort by dependency of all the kernel subsystems

#

ive been following this plan unmodified for like 9 months

#

i embarked on the rewrite uhh

#

2 years ago

#

and ive written about 80000 lines of code in service of that

twilit smelt
#

RAAAAAAAAAAAA

#

*writes 100 lines of code a week

#

no i think things will heat up now that its doing something interesting (inputting and outputting)

twilit smelt
#

very first thing ill be doing in the IO system is IO packets

#

which will be almost identical to how they were implemented in old mintia probably

toxic grove
#

Just out of curiousity, what order have you made things in the kernel so far in this version?

twilit smelt
toxic grove
#

oh

#

Maybe I should have just read up a little bit

#

do you intend on doing an x86 port (32 and/or 64) at some point?

twilit smelt
#

yes an amd64 port will happen after all this is done

toxic grove
#

ok

twilit smelt
#

any variation on this order leads only to pain

#

that is to say

#
  1. exception handling & spinlocks
  2. scheduler
  3. blocking mutexes
  4. pmm
  5. heap
  6. drivers
  7. vmm
toxic grove
#

So, at what point does multiprocessor support exist?

#

and how does the heap work if it is before the VMM?

twilit smelt
#

multiprocessor support is like

#

before #1

#

its #0 which is architectural initialization minutia that isnt worth mentioning

twilit smelt
toxic grove
#

wouldn't it be using virtual memory?

twilit smelt
#

yes

#

but if youre on 64 bit you probably have some big hhdm like limine gives you

#

you can just Use That

#

even if you dont, page table management is not the same thing as virtual memory management

toxic grove
#

I know that

#

I think I understand

#

On 32-bit, physical memory and virtual memory aren't that different

twilit smelt
#

and then in the memory manager i just Assume that those PTEs exist and that i can directly use them to map stuff

#

this is one of the tricks the deep state doesnt want you to know about

#

and has banned me several times for spreading

coarse current
#

bad tricks trl

twilit smelt
twilit smelt
#

going to suddenly dump a 10k line commit that implements the entire io system

#

io packet management is going quickly because im largely able to just rewrite directly from old mintia (some of the first code where ive been able to actually do that)

#

i havent had any groundbreaking developments since then so its mostly applicable to the new design

#

streams is the only new thing here and that will be fully encapsulated by the existing packet structure

#

a streams request will just be a single-level io packet targeted at a streams wrapper driver

#

that works as an adaptor between the data flow driven streams stacks and the request driven higher level IO structure

toxic grove
#

Is there still a mintia discord server?

twilit smelt
#

yes but its in an inactive phase rn

#

probably until the next time i get banned from here

toxic grove
#

Can I get an invite to that server? (obviously in a DM, not here)

twilit smelt
#

example of a track i can listen to on repeat until my brain goes numb enough to just work on stuff for 8 hours straight

mortal thunder
#

especially that last part

twilit smelt
#

video game OSTs dont count as music

#

except the sonic R soundtrack since thats the one i like a few songs off of

#

but i never played the game theyre from so its fine

twilit smelt
#

look how much of a level-up jackal is

#

some packet routines in dragonfruit:

#

same in jackal:

#

looks almost like a real kernel now!

#

old mintia feels like the VMS to this guy's NT or something

#

weird crummy ancient uniprocessor thing polished to shit

mortal thunder
signal zinc
#

lmao will wtf

twilit smelt
#

WOKE is cancelling me for my opinons

mortal thunder
#

404

twilit smelt
#

it satisfies my monkey brain being upset at no cool flashing colrs on the screen.

twilit smelt
#

this is real music

#

lyrics: oh oh ah oh heyahey

signal zinc
#

lyric? love her

white valley
#

i think you got tricked into listening to unreal music

tardy harbor
dark shard
twilit smelt
#

packet enqueue

sterile frost
#

wtf jackal syntax highlighting

#

where do i get that

twilit smelt
#

@warm pine i am considering doing the any-context part of IO packet completion from worker thread context

#

all my pmm locks and stuff are blocking mutexes so i can no longer do it directly from the DPC

#

bc that part needs to quickly unlock memory and stuff

#

so youd call IoCompletePacketFromDpc and this will enqueue a worker item which calls IoCompletePacket which does the any-context part and then, if relevant, enqueues an APC to the requesting thread

#

i could do the whole thing from the APC context always

#

but then i dont get prompt response for unlocking memory and doing the completion callbacks and stuff

#

unless i unconditionally did a really big priority boost to the requesting thread while it executes that APC

warm pine
#

your smp approach is similarly styled to what was intended (and implemented with compromises) for solaris

#

where they wanted to upgrade interrupts where possible to threads in such a way as keeps the logic of the interrupting (and they optimised this with tricks like acquiring full thread context only if the handler has to block)

twilit smelt
#

oh yeah

warm pine
#

it goes the same for the i/o completion dpc

#

i'd be perceiving this as a case of interrupt threading

twilit smelt
#

you just made me remember that Most of the interrupt work for most of my drivers was gonna be in worker thread context anyway (because of all the locks being blocking mutexes), so i can just directly call IoCompletePacket most of the time

#

like, ill have already eaten the cost of dispatching to a worker thread

#

IoCompletePacketFromDpc would be like a helper

twilit smelt
#

packets r done

#

next up i will do xrstation disk driver to flesh out device objects and stuff

#

and then ill do mintia2's first IO request

twilit smelt
#

4 years after old mintia's first io request

#

:(

#

this thing has been in development almost as long as NT 3.1 was

#

but does way less because im just 1 stupid gay idiot

#

i sure have learned a lot though

twilit smelt
#

also im really hyped about how much better mintia2 is than mintia1 in every conceivable way

#

my Extremely Ambitious Plan is panning out well so far

#

p much everything that bothered me in old mintia is fixed this time around

#

so far

#

but its still only like idk 25% done

#

youd think itd be disheartening to see this line count and still only be able to go "yeah its idk 25% done"

#

but its not cuz ik ill get there

#

itll take like a year but i will

twilit smelt
#

in mintia2 im building the platform-specific stuff into the kernel binary

#

so the HAL and the "platform driver", which in old mintia was all the integral components of the platform (so stuff thatd be soldered on the mobo) linked together to save some space thatd otherwise be wasted by executable headers for the extra modules

#

i am calling the platform driver the ISD for "integral system driver" this time and its also getting linked into the kernel binary

#

i have no separate HAL binary cuz that was pointless larp last time, and if im linking that into the kernel then the platform driver should go in there too

mortal thunder
#

well, that's cool

twilit smelt
#

test crash halfway thru the fireworks test thread drawing its background

#

from another cpu no less

white valley
#

isnt all larp just for entertainment

twilit smelt
twilit smelt
# white valley why was it "pointless larp"

the point of the HAL was to put the platform-specific stuff in a separate binary, so that people porting NT to new platforms could do so without needing source code access

#

two reasons this makes no sense for me to adopt and made no sense in old mintia:

  1. its open source anyway
  2. even in practice in NT theyd just give people full kernel source access, and they ended up regretting the HAL eventually
#

platform-specific is not to be confused with architecture-specific

#

arch-specific code was always compiled directly into the kernel binary

#

so like they supported the MIPS architecture, and the MIPS arch-specific stuff was just compiled into the kernel

#

but they supported like 10 different MIPS platforms (various attempts at workstations and PCs) and they each had their own HAL

#

this is a third reason it made no sense for me to adopt: there's a one-to-one correspondence between architecture and platform for all three of my intended targets anyway

#

fox32, xr17032, and amd64 each dont really exist outside of a particular platform

mortal thunder
#

@twilit smelt i may have found a bug in the fireworks test again

#

see this

#

i believe that's supposed to break out of the loop, not entirely exit the function

#

so in OoM situations you might end up crashing in an explodeable thread

#

(unless you made threads automatically exit when returning from their entry point)

twilit smelt
#

i did not make them do that

mortal thunder
#

so it's a bug

twilit smelt
#

yep

#

id say "good catch" but its ur bug to begin with

mortal thunder
#

well yeah it's my bug sorry

twilit smelt
#

btw i still have a hal internally and it is conceptually separate from the arch-specific code

#

but its all linked together

#

this time

#

the ISD and HAL are going into the same source directory

#

but r logically separate components

#

the HAL is logically part of Ke and the ISD is a driver

twilit smelt