View Full Version: Ideas for Dex4u

dex >>DexOS >>Ideas for Dex4u


Dex- 11-30-2005

Even in the so called single tasking ver of Dex4u, there will be a simple form of multi-task for drivers etc. I was thinking of time slice that could be set from a text file at startup, maybe 10% for drivers and 90% for the main program as default, also you could set it 0 for no Multi-Tasking and the main program would get 100% . Any idea's on this or other ways of doing simple M-T welcome.

Rohan- 12-09-2005

I think the main way --> creatу good console os work in graphics mod. And from consol you can run gui programs.

versionzero- 06-04-2006

If you let me tell my opiinion that would be as follow: We may distinguisth two deferent case 1. To have more that one application loaded but just one running at one given time with the possibiliy to swith from one to another. So this is mono task muliple load. 2. To have the possiblity to run task in the background when you are currently doing another task. The goal here is different then the one above. We want to use the cpu concurently. One say he want to keep the full CPU and other say want multitasking. Could I propose this thing ? First I would focus on mono task OS rather then multitasking OS but I would be open to one thing about background task that could be done. The main idea is just to let the CPU used by background task at just one moment and just this one. When we call the OS Keyboard service. At that time, if nothing happen on the keyboard we are in idle time and could give the CPU idle to background task because this is the only time we are sure that notihg else happen and the CPU is realy free. We could do the same with the mouse in GUI mode Is this a way to have the best of both world? Regards

DennisCGc- 06-04-2006

Waiting on IO ports just kills performance, so although I agree with bubach about there being alot of other stuff on the to-do list without having to add multitasking, unless you can come up with a new, better way of doing things, if you're going to add networking, I think you'll find some sort of multitasking is enviable ..... Hi, I'm also programming for Windows (in assembly of course). I did a few experiments about socket programming and I think I have enough experience to say something about it. (I did some socket programming before in PHP f.e., and erm, know basic TCP/IP, as in, I have read the RFCs a few times. I'm also designing a TCP/IP stack.) The only reason why I/O Completion ports is more used is that select() (and the like) performs worse than it does on Unix-like OSes. Infact, IOCompletionPorts is not to be found in Unix-like OSes, and the apps use select, or some even use poll(). And don't forget, there's always event-based programming. This way a single-tasking OS could perform prolly the same way as a multitasking OS would. However, there are a few exceptions to that. DennisCGc. PS. Disclaimer: the post here only expresses DennisCGc's thoughts about the TCP/IP stack found in Windows. He did not designed, therefor he could be wrong. If so, which is unlikely :P, correct him. :P

Dex- 06-04-2006

Hi all, @versionzero, As Dex4u can load modules, but only runs one task at a time, it's like your example 1. And with my work with the GUI mouse, i have come to the conclusion that even a single-tasking OS like Dex4u need multi-threading support. But as for you running tasks in background, that would be very usefull, so now the code is freely available, i am hoping that idea's like yours, could be added to Dex4u by anyone with the time, so hope fully we will get faster dev Dex4u OS. @DennisCGc, look forward to your work TCP/IP for Dex4u.

tonyMac- 06-04-2006

I have found info on how to implement things like multi-tasking and multi-threading on something as limited as the Z80 (While limited, do not mistake it for a primitive CPU. It has some outstanding capabilities) If you want, I could give you a link to that document to possibly show a simplest possible multithreading system which would not slow the system down.

Dex- 06-05-2006

That would be great, thanks.

tonyMac- 06-05-2006

http://www.geocities.com/SiliconValley/Peaks/3938/multtask.htm This is the link, it covers things like priority and such, too. I was planning on using it on my 16 bit OS vapor-ware. :lol:

Dex- 06-05-2006

:lol: , Thanks.

versionzero- 06-06-2006

Hi Dex, thank for your specified If you allow me, I would like to expose some idea about some possible way to make ip stack. Do you realy need a multithread for the ip stack? A siigle callbach to application would not be sufficient if there is a call back system faciliy? I supppose single task OS in my talk. I suppose the ip stack may be hooked on an interrup with is hardware called. So we could register a callback by a end user application. This application is then free to use this data. The ip interrup handler have to clean the data before to call our callback function. This apply for receiving data for ip stack. The other case is when we send data. We could call the interrup service in this second case. I sea to way to make it. 1. is we tell the interrup service that we want to send and give to it a pointer of our data along with the data length. This may frose our application if that take to long to complete the operation. We could send few bytes at a time to minimise wainting time or waith the inerrup bandler to send us a callback when completed 2. We tell the interrup handler that we wan to send.x bytes, the interrup handler then send us a call back where it tell how many bytes we could send. We give it a pointer on our data and the number of bytes realy send. The callback repeat until we put 0 has number of bytes send. Would that make any sense or I'm wrong?

Dex- 06-06-2006

@versionzero, First thanks for your input, and you probably know alot more about how TCP/IP workings, as i have never done any type of network programming. So i hope to learn as we make, i will start by reading as much info as i can, then once i have agood idea of the way the packets work and interface, we will start coding. So any help will be great, i have been waiting to get into Network from the start of coding Dex4u, as i am a hacker at art (white hat of cause :wink: ). So firer away your ideas. EDIT: MenuetOS seen to work the same way as you describe, so it looks like your on the right track 8) www.menuetos.org/www/eng/stack.htm

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.