Page 1 of 1
multitasking in console mode
Posted: Sun Jun 04, 2006 11:00 pm
by earlz
I haven't yet got multitasking working but I'm wondering how exactly am I going to do multitasking in console mode cause there is no windows or anything like that so really how will i switch or see the other
Re: multitasking in console mode
Posted: Sun Jun 04, 2006 11:00 pm
by Da_Maestro
Look at the way UNIX shells work...they where doing multitasking way back in the '70s dude!
bash is my favorite shell
Re: multitasking in console mode
Posted: Sun Jun 04, 2006 11:00 pm
by earlz
back in the '70s dude!
OMG like didn't they barely have batch systems then
Re: multitasking in console mode
Posted: Mon Jun 05, 2006 11:00 pm
by Dex
Also look at Dos TSR thats basic multi-tasking.
Re: multitasking in console mode
Posted: Mon Jun 05, 2006 11:00 pm
by Da_Maestro
hckr83 wrote:OMG like didn't they barely have batch systems then
No batch processing was early '60s.
Posted: Wed Jun 21, 2006 9:08 am
by deficite
Virtual consoles are how Unix environments handle interacting with mulitple programs on a single machine. My computer has 6 including the 7th's X console. Since you've asked this question, I've assumed you've never use a *nix environment, so I'll explain it to you. Virtual console fake the existance of terminals connected to your computer. If you press ALT+F2 you are taken to the second console, ALT+F3 takes you to the third, and so on. It's basically emulating multiple computers connected to a single machine. Now you don't have to implement it the way *nix does it (where the virtual consoles are terminal emulators and operate with the OS via a fake serial interface), but you get the general idea.
And while TSR's were kind of like multi-tasking, there are not really what the starter of the thread wanted. He, if I understand correctly, wanted to know how to interact with multiple programs at once from a text environment.
Posted: Fri Jun 23, 2006 10:31 am
by blackcatcoder
Multitasking basicly has nothing to do with GUIs!
Posted: Fri Jun 23, 2006 10:46 am
by deficite
Correct. The GUI just presents windows.
Posted: Tue Jun 27, 2006 1:12 am
by AndrewAPrice
A simple way of implementing multiple console screens is to have multiple screen buffers. Switching consoles (such as pressing ALT+F1, ALT+F2, ALT+F3) switches to active screenbuffer (buffer 1, buffer 2, buffer 3 respectivly). Then change your text library to write to the active buffer. If you have an input buffer, have a seperate one for each console also. It is actually quite simple to implement.
When it starts to become more complex is when you want to add multitasking (i.e. running a program on console 1 while running a different program on console 2).. For these, I suggest that you take a look into multitasking. Cooperative multi-tasking (where by pressing ALT+F2 will switch to Program 2 and halt Program 1) will be much easier to implement. Preemptive multi-tasking (where by pressing ALT+F2 will switch the screen buffer to Program 2 without halting Program 1) is more complex to implement in the short term, but has advantages in the long run. To implement preemptive multi-tasking, take a look into using the timer interrupt to switch between consoles, and only drawing the active console's buffer on the screen.