Amount of stack space reserved for an applitacion program?
Posted: Wed Mar 17, 2004 12:00 am
Hello OS developers:
I am programming the EXEC service of my OS, this service load an executable file into the memory, create a process (TSS, LDT, etc.) and start the execution of the process (including it into a round-robin).
I complie all the 'application programs' as 'plain binary format' with a very basic header, and I realize that the result file have just the .text and .data sections, but not the .bss section. Then I must reserve some memory for this section dynamically.
My question is about the STACK space:
Who must determinate the amount of stack space reserved for an applitacion program?
1) The programmer: When the application is created/compiled.
2) The user of the OS: Sending the stack size as parameter when the EXEC service is called.
3) The OS itself: Reserving an arbitrary amount of stack space for each process.
Some body have resolved this problem yet?
Any idea?
Thank you very much,
pepito
I am programming the EXEC service of my OS, this service load an executable file into the memory, create a process (TSS, LDT, etc.) and start the execution of the process (including it into a round-robin).
I complie all the 'application programs' as 'plain binary format' with a very basic header, and I realize that the result file have just the .text and .data sections, but not the .bss section. Then I must reserve some memory for this section dynamically.
My question is about the STACK space:
Who must determinate the amount of stack space reserved for an applitacion program?
1) The programmer: When the application is created/compiled.
2) The user of the OS: Sending the stack size as parameter when the EXEC service is called.
3) The OS itself: Reserving an arbitrary amount of stack space for each process.
Some body have resolved this problem yet?
Any idea?
Thank you very much,
pepito