<bslsk05>
rallepalaveev/romcard - A card with 8x64kB EPROMs for Apple ][ compatible computers with binary files and DOS 3.3 (0 forks/0 stargazers/NOASSERTION)
saltd has quit [Remote host closed the connection]
<wxwisiasdf>
hmm
<gog>
good morning to you too
tarel2 has joined #osdev
<geist>
hihi
<tarel2>
What is the os in os dev here , Linux ?
<geist>
no, usually homegrown
<GeDaMo>
This channel is for people interested in making their own OSs
sonny has joined #osdev
<sonny>
How is the stack size determined?
<geist>
depends. for programs or for kernel stacks?
<geist>
or just in gneeral?
<sonny>
for programs
<sonny>
processes*
<geist>
ah wlel, in gneral i think for the first process each os has a default stack size and/or it's described in the binary itsel f(ELF has some tags for this)
<sonny>
I.e. the OS tells the programmer the stack size, but as an implementor how do you choose a suitable size?
<geist>
for secondary threads you can specify the stack size in the thread routine creation args, usually, though probably a reasonable default is picked if ythe program doesn't care
<geist>
the short of it is for user processes i thinnk most OSes the stack size is mostly in control of the user programmer, and the OS/kernel is just doing what it's told, inn short
<sonny>
Also I assume that when the process has the stack and heap reach their limits a new page is requested?
<sonny>
ah ok
<geist>
and yeah the exact mechanism that stacks use to grow, but on anything at least reasonably modern, the stacks will be demand faulted
<geist>
and at least grow to their maximum size before running out
<tarel2>
wow, GenDaMo , your own os that is cool.
<sonny>
that's sensible
<GeDaMo>
I don't have one :P
<tarel2>
Well, even wanting to make an os is crazy. What a big app
<geist>
sonny: with multithreaded apps though a given thread's stack cant grow forever
<geist>
since there are other stacks there too, so usually you pick some sort of reasonable max size, reserve the virtual memory for it, and then leave it at that
<sonny>
have people done a lot of profiling to figure this out? I assume the popular OSes have a similar limit
<tarel2>
so os dev do you all write assembly ? os it c mostly and a bit of assembly ?
<sonny>
C is a popular language for osdev
<sonny>
doesn't seem to require a lot of assembly
<geist>
sonny: it's a tradeoff of 'burning' virtual memory and giving a reasonable limit yeah
<geist>
i think i've seen it something like say 8MB for the first thread and then subsequent threads get 1MB, etc
<geist>
as a default at least
<geist>
with modern 64bit systems the amont of virtual memory you have available isn't so much a limit for the stacks, so it's not a general concern
<geist>
though 64bit cpus tend to use more stack because of additinoal register sies being dumped to the stack
Ali_A has joined #osdev
<sonny>
oh, even with more registers I guess there's not enough, and that split sounds like the main thread is to do most of the work
<sonny>
I have to go, but thanks for explaining
<Ali_A>
I really wish there was a log, so I can see what sonny was talking about
<geist>
there is a lot
<geist>
see the topic
<chibill>
Ali_A: I also get to see everything that has happened since I am connected thru matrix.
<mjg_>
i'm gonna say there is a huge quality of life improevement for going 32 -> 64 bit
<mjg_>
my fav little bit: if you need to allocate unique integers, simplest thing you can do is just keep adding 1
<Ali_A>
As far as I know, since I can not stay online, I can not see what was missing before i join
<mjg_>
no need to track squat as long as you can stick to 64 bit numbers
<geist>
Ali_A: did you see the logs in the topic?
<geist>
there's a link to a site that tracks logs of the channel
<geist>
mjg_: yeah we currently do that for tracking unique ids to kernel objects in fuchsia
<tarel2>
I have wrote / coped code in assembly for linux and a micro controller . that is one reason I learned assembly
<geist>
tarel2: cool, well, there is generally some low level need for assmbly in most kernels yes
<geist>
though not as much as you generally think
sonny has quit [Ping timeout: 252 seconds]
<tarel2>
so that small amount of assembly , what is that used for?
<geist>
usually low level things like interrupt handlers
<geist>
or the first part of it, the part that saves registers and then calls into higher level code
Ali_A has quit [Quit: Client closed]
<j`ey>
and also for setting system registers
<geist>
yah
<geist>
usually in the form of inline assembly
<tarel2>
what is inline assembly?
<geist>
it's a way to insert raw assembly instructions in higher level languages
<GeDaMo>
Some C compilers allow you to put asm in the middle of C functions
<bslsk05>
github.com: lk/x86.h at master · littlekernel/lk · GitHub
<geist>
there's otherwise no way to access the special cr3 regsiter in C, so I use inline assembly to do it (and wraps it in a helper function so it is nice to use)
FatAlbert has joined #osdev
<FatAlbert>
hello #osdev :)
<tarel2>
I love being able to ask real programmers this. for better then reading some wiki pedia
<bslsk05>
github.com: lk/exceptions.S at master · littlekernel/lk · GitHub
<geist>
that code bridges the gap between taking an irq and getting into C code
<tarel2>
does libera chat have firmware chat rooms?
<GeDaMo>
'firmware' is a bit generaic
<tarel2>
is by the hardware?
<GeDaMo>
You can search channel names with /msg alis list *pattern* and channel topics with /msg alis list * -topic *pattern*
<GeDaMo>
You can limit the results to channels with at least 10 nicks by adding -min 10
<tarel2>
recently , learned about the programming room. I being wanting to go deeper but I don't know what is on libera chat
<GeDaMo>
I'm also in ##asm for assembly language programming
<tarel2>
I see you around a lot
<GeDaMo>
:|
<tarel2>
I have noticed over time, a lot of people who I see in the rooms
<FatAlbert>
GeDaMo: you alive and kicking !
<tarel2>
do you know other Linux people in person? like you could go have a beer with them. I don't
<GeDaMo>
See if there's a Linux User's Group near you
<GeDaMo>
Or maybe a hacker / maker space
<tarel2>
I did that one time, It was like older timers who have seen everything , so they where way from away from me and the people who like and play with it.
<tarel2>
the old timers where like being in the electrics room, so beyond me.
foudfou has quit [Ping timeout: 258 seconds]
FatAlbert has quit [Quit: WeeChat 3.6]
foudfou has joined #osdev
saltd has joined #osdev
elderK has joined #osdev
smach has joined #osdev
smach has quit [Client Quit]
saltd has quit [Remote host closed the connection]