flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
roboman 16 May 2008, 05:14
"only a single process is allowed (though that process can spawn multiple threads). The program runs in ring0, you have direct access to all hardware (including CPU and graphics). Memory allocation is the responsibility of the app--there's no front-end memory allocation"
That part of the description of DexOS is a little old. You can also load drivers that are kind of like a Dos tsr and you can link them to an interrupt. The OS does some loading and provides some standard function calls, but the system is left open to do what ever the programer wants |
|||
![]() |
|
Dex4u 16 May 2008, 11:35
I would add on to what roboman as put, that many codes interpret multi-tasking V multi-threading in many differant ways.
From my point of view, multi-tasking is running more than one program at the same time including running multi instances of the same program. Multi-threading is running more than one thread inside a program. Take a http server for a example, if its a single threading server running on a single-tasking OS you can only serve one page at a time. But if the server was multi-threading, each new request could be give its own thread which would be call in its turn, once it finished it would be deleted from the list. So multi-threading is a much better ver of the MAIN loop, in a main loop of a game for example it is possable for something taking longer to stop or slow down something else, but with multi-threading it is given a time slice and than switched to the next in the list. In multi-threading (in DexOS case anyway) you can have thread states (just like task states) free ready send recv putc getc Just like multi-tasking, if you want. So to answer your ?, one is running more than one program at a time, the other is running more the one thread inside a program. I can if you want dig out a simple DexOS example, if it would help. Regards Dex. |
|||
![]() |
|
dasyar 16 May 2008, 13:25
For an example, the answer would be yes, I think that other people would also be interested. I am still not sure how multi-threading would be more beneficial than multi-tasking. Also, when you say that DexOS does not do multi-tasking, you mean it is not using the built-in processor functions, which means you could still do it with some software functions?
Thanks |
|||
![]() |
|
Dex4u 16 May 2008, 14:13
dasyar wrote: For an example, the answer would be yes, I think that other people would also be interested. I am still not sure how multi-threading would be more beneficial than multi-tasking. Also, when you say that DexOS does not do multi-tasking, you mean it is not using the built-in processor functions, which means you could still do it with some software functions? I will post a example and yes you could make DexOS multi-task from code run from a module. As to why multi-threading could be more beneficial than multi-tasking, the answer it for some task it can be, for example when you are coding for a multi-tasking OS you do not know what else is being run or how many other programs are being run. With multi-threading ( as it is in DexOS) you still have full control over the whole OS. That is very important with DexOS, to beable to control and have direct acsess to all hardware. Thinks like the xbox are single tasking, but multi-threading. Also you can us multi core for multi-threading. |
|||
![]() |
|
edfed 16 May 2008, 14:57
assuming an os is an application..
the programs running can be concidered as threads. then, does multitasking really exist? |
|||
![]() |
|
roboman 16 May 2008, 15:23
The clock program on my web page would probably be called a multitasking program. It's external to any program that is being run and just updates a clock in the corner of the screen once a min. If, for example, you open up the text processor, the clock is still running in the background. It has nothing to do with the OS and just sits up in high mem stealing a few clock cycles several times a second. You could probably also call it multi threading, since it's written so that it can be turned off and on from inside another program. You turn it off and it no longer eats clock cycles, turn it back on and runs at the same time your program does, checking several times a second to see if the on screen clock needs updating. But the OS doesn't do the swapping between the tasks. A good example of where multithreading being good is a game. Each computer controled player may only need to have their movements updated 24 times a second, so every 1/24 of a second they get accessed and the rest to the time the game is in the main loop trying to keep your movements and screen updates as smooth as possable.
http://home.comcast.net/~dexos/ |
|||
![]() |
|
DJ Mauretto 18 May 2008, 10:11
Hello
![]() Note that your CPUID program inside DexOS report to me HTT technology , but my CPU don't support such extension. To detect HTT: Code: mov eax,1 cpuid shr ebx,16 and ebx,0ffh cmp ebx,2 jc HTT_Not_Supported |
|||
![]() |
|
Dex4u 18 May 2008, 14:43
Thanks for the info D J Mauretto, i will look into it
![]() |
|||
![]() |
|
edfed 28 May 2008, 21:13
another mod to do :
HLT somewhere in the mainloop to save energy and avoid the termal shutdown of PC. |
|||
![]() |
|
Borsuc 29 May 2008, 09:27
Multi-threading is way more important than Multi-tasking for some interactive applications like 3D renderers or games
![]() ![]() |
|||
![]() |
|
Dex4u 29 May 2008, 12:36
Thanks for your inputs i agree with both of you, eg: this is the main CLI loop
Code:
CheckForKey:
call GetCommand
call ProcessCmd
hlt
jmp CheckForKey
|
|||
![]() |
|
DJ Mauretto 29 May 2008, 12:45
Remember always to enable interrupt flag
![]() Code: CheckForKey:
call GetCommand
call ProcessCmd
sti
hlt
jmp CheckForKey _________________ Nil Volentibus Arduum ![]() |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.