flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > OS Design Multitask |
Author |
|
edfed 13 Dec 2007, 01:24
screen print can be made by only one code, the global gui.
i explain: all graphics are from graphix functions, with correct parameters. each task can have a single render stack, this stack will contain all the graphix request for render. the task doesn't display anything, just say to the global gui what to display. ones the task are threaded, return to main , the main will make the final render. if a task have the time to fully set it's render stack, a flag is set and the main gui can render the task. a task can be interrupted everywhere, because it's multitasking. example: task0: load disk in mem task2: mouse int in mem task3: program with render request task4: another program ... timer will switch the tasks at various intervals. the task manager set the period for each task, depending on task content, if a task need only 100 cycles to loop, no need to execute it more. if a task use a lot of cycles > 100 000 000, it will be switched before it reloop and returned during next switch. all these suggestions are in fact the idea i want to apply for MY OS: SEA i am thinking about this problem since a long time, i have studed all possibilities, and this one appear to be one of the best, but one of the more complex to code. |
|||
13 Dec 2007, 01:24 |
|
vid 13 Dec 2007, 02:58
Quote: ones the task are threaded, return to main , the main will make the final render. what do you call "main" here? Quote: if a task have the time to fully set it's render stack, a flag is set and the main gui can render the task. what is "main gui"? same thing you call "renderer" or "global gui"? Using some solid naming for components would render your text much more readable. In current presentation, it is very unclear what is what. dosin: idea as explained by edfed is right. There should be only one component that will do actual drawing (writing to video buffer), and other components should just call functions provided by this component. In windows this component is GDI (alternatively DirectDraw), in linux it is X server. Caching these requests, not immediate processing, is a good idea. |
|||
13 Dec 2007, 02:58 |
|
edfed 13 Dec 2007, 03:15
renderer == global gui == main
sorry, like i'm not informatician, i don't know axactlly what i say. in fact, i only know asm instruction set. the rest is like a shadow for me. sorry... the main is simply the part of the kernel that is executed before each task switch session, a task switch sessio for me is one task switch cycle/loop, you see what i mean? for task that haven't the time to set all it's request, we need two render stack per task. one active and one pending... the active is the one who is ready to display, the pending is the stack currently defined. because without this, some long time task will render with missing drawing. i'm working on a task manager like this, i already have a good render stack manager. application exemple is in my bootpm.zip. |
|||
13 Dec 2007, 03:15 |
|
dosin 13 Dec 2007, 03:38
Quote: There should be only one component that will do actual drawing (writing to video buffer), and other components should just call functions provided by this component Well thats what my render does.. and thats why I said it was kind of weird calling it in all the int ??s that use it... I was thinking of adding the render() function into the task switch... somehow.. the pixel and all drawling functions draw to the buffer.. then the render puts the buffer to the screen.. Is there anywere on the net I can read about that type of multitasking edfed.. ? |
|||
13 Dec 2007, 03:38 |
|
edfed 13 Dec 2007, 04:02
only one place, my brain..
seriously, as i'm a beginner, i don't know what i speak about, all that i say, i extact it from my logic mind. in the asm-life, there are some things you shall do youself, like re-invent the weel everydays. i'll give you more precision about it when i'll make it because i don't know anyplace to find any theory for this, so i'll seek the solution in my brain, i always make it. |
|||
13 Dec 2007, 04:02 |
|
dosin 13 Dec 2007, 05:11
I have been looking over linux.. for ideas... Though I'll prob use something sim at first... I am just in the early stages of this.. and wanted to here what people had to say.. about rendering the screen and multitasking in general...
pros/cons.. just looking for ideas... Though, I usually do things the hardway first... Thanks, again for any input! |
|||
13 Dec 2007, 05:11 |
|
edfed 21 Dec 2007, 21:07
hello dosin!
have you got a working task switch now? if yes, do you use the IRQ0? , do you save states in hardware TSS? , do you point to GDT or LDT for tasks? hem, too much questions i think... |
|||
21 Dec 2007, 21:07 |
|
dosin 21 Dec 2007, 22:28
Quote: if yes, do you use the IRQ0? Yes, the iret/retf will fire to my irq0 / int 32 Quote: do you save states in hardware TSS not yet-I need to add more irqs first.. I have irq0,irq1,irq6-in progress, I want to complete all the irqs before I add Quote: do you point to GDT or LDT for tasks? I have been using the GDT so far... |
|||
21 Dec 2007, 22:28 |
|
Mac2004 22 Dec 2007, 16:52
dosin: Are targetting 32bit or 64bit OS? There's no hardware task switch in long mode...
regards, Mac2004 |
|||
22 Dec 2007, 16:52 |
|
dosin 22 Dec 2007, 17:30
32 bit
|
|||
22 Dec 2007, 17:30 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.