Jump to content
Sign in to follow this  
AtomicMX

How does Multitasking work?

Recommended Posts

I am not meaning multi-window appz. i mean real multitasking...

 

how does the OS manage to let the programs have the control of the machine; having them all active; and pushin and poping the values of the pointers (ip,di,si...) from the stack, and manage to regain control when one of those programs get frozen...

Share this post


Link to post
Share on other sites

Multi-programming OS allocate a certain portion of current memory to each running program (each portion is called a 'page'), each page is swapped into and out of main memory, executed and allocated to RAM. If you happen to experiance (a regular occurance with 3D studio max and my computer *sigh*) a freeze, the processor clock is still in sync and can still recieve interrupt commands from the control bus, such as you pressing the enter key on the cntrl + alt + del screen to end task....a packet is sent and 'IF no REPLY THEN accept interrupt' and cancel / swap the 'page' .... that's it in basic terms well at least I think, hard to remember back to module 2 in the first year of college :). Also it depends on what type of system it is - Real time, batch, networked as to the way it works some don't have fetch - execute cycle / stored program concept values so they work differently.

Share this post


Link to post
Share on other sites

multitask programs are given the priority levels in java and the time for abou how much seconds or miliseconds to pause this function and in the mean time the other one is resumed but remember once removed the other task will take its time according to the priority then it will stop in this way you can make many functions stop one resume other.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.