All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] The UML scheduler
@ 2005-05-16 14:30 Young Koh
  2005-05-16 15:06 ` Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: Young Koh @ 2005-05-16 14:30 UTC (permalink / raw)
  To: user-mode-linux-devel

Hi,

I have studied the UML kernel a bit but it was hard to understand from
the code and some document in the web site. I have some questions
about the scheduling in UML. so, if anyone answer these, i really
appreciate it. Thank you!

As long as i know, each process running on top of UML kernel is viewed
as a process to the host kernel. then, the host kernel will try to
schedule the UML processes as normal processes. well, i'll have an
example.

suppose there are 2 processes on top of UML and 3 host processes.
then, the host kernel sees 5 processes total, so, each of the process
will get 20% of the CPU time? is that right?

Or, UML is somehow viewed as a group of processes and UML get 25% of
the CPU and each UML got 12.5% of the CPU time? if so, how is it
possible?

one more question, when the UML kernel wants to schedule its
processes, how does it preempt UML processes?

this way of scheduling and preemption will be different from TT mode
and SKAS mode? if so, how?

Thank you,


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id\x16281&opÌk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] The UML scheduler
  2005-05-16 14:30 [uml-devel] The UML scheduler Young Koh
@ 2005-05-16 15:06 ` Jeff Dike
  2005-05-16 15:37   ` Young Koh
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Dike @ 2005-05-16 15:06 UTC (permalink / raw)
  To: Young Koh; +Cc: user-mode-linux-devel

On Mon, May 16, 2005 at 10:30:33AM -0400, Young Koh wrote:
> suppose there are 2 processes on top of UML and 3 host processes.
> then, the host kernel sees 5 processes total, so, each of the process
> will get 20% of the CPU time? is that right?

In tt mode, there will be 5 processes, but it will be difficult for the 2 UML
processes to each get 20% of the time, since only one of them will be runnable
at a time on the host.  This is still unfair because each of them will have
a higher dynamic priority than the 3 host processes because they are each only
runnable half the time.

In skas mode, there is only one host process for all of the UML processes.

> Or, UML is somehow viewed as a group of processes and UML get 25% of
> the CPU and each UML got 12.5% of the CPU time? if so, how is it
> possible?

In skas mode, this is true.

> one more question, when the UML kernel wants to schedule its
> processes, how does it preempt UML processes?

The same way as any other architecture.  A timer tick comes in, and the 
timer handler calls schedule().

> this way of scheduling and preemption will be different from TT mode
> and SKAS mode? if so, how?

No, exactly the same.

				Jeff


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] The UML scheduler
  2005-05-16 15:06 ` Jeff Dike
@ 2005-05-16 15:37   ` Young Koh
  2005-05-16 16:58     ` Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: Young Koh @ 2005-05-16 15:37 UTC (permalink / raw)
  To: user-mode-linux-devel

Thank you for your reply. I have one following question.

in native Linux, a timer tick goes to the kernel, which has the
previliege to save the current context and switch the running process.
But UML kernel is just another user level process, even though it is
tracing the application processes. in UML case, when a timer tick goes
to the UML kernel, how does it stop the running process, which is
another process?

it seems it's a primitive quesion, but it will help me a lot to
understand more about UML. Thank you!

On 5/16/05, Jeff Dike <jdike@addtoit.com> wrote:
> On Mon, May 16, 2005 at 10:30:33AM -0400, Young Koh wrote:
> > suppose there are 2 processes on top of UML and 3 host processes.
> > then, the host kernel sees 5 processes total, so, each of the process
> > will get 20% of the CPU time? is that right?
> 
> In tt mode, there will be 5 processes, but it will be difficult for the 2 UML
> processes to each get 20% of the time, since only one of them will be runnable
> at a time on the host.  This is still unfair because each of them will have
> a higher dynamic priority than the 3 host processes because they are each only
> runnable half the time.
> 
> In skas mode, there is only one host process for all of the UML processes.
> 
> > Or, UML is somehow viewed as a group of processes and UML get 25% of
> > the CPU and each UML got 12.5% of the CPU time? if so, how is it
> > possible?
> 
> In skas mode, this is true.
> 
> > one more question, when the UML kernel wants to schedule its
> > processes, how does it preempt UML processes?
> 
> The same way as any other architecture.  A timer tick comes in, and the
> timer handler calls schedule().
> 
> > this way of scheduling and preemption will be different from TT mode
> > and SKAS mode? if so, how?
> 
> No, exactly the same.
> 
>                                Jeff
>


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id\x16281&opÌk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] The UML scheduler
  2005-05-16 15:37   ` Young Koh
@ 2005-05-16 16:58     ` Jeff Dike
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Dike @ 2005-05-16 16:58 UTC (permalink / raw)
  To: Young Koh; +Cc: user-mode-linux-devel

On Mon, May 16, 2005 at 11:37:49AM -0400, Young Koh wrote:
> Thank you for your reply. I have one following question.
> 
> in native Linux, a timer tick goes to the kernel, which has the
> previliege to save the current context and switch the running process.
> But UML kernel is just another user level process, even though it is
> tracing the application processes. in UML case, when a timer tick goes
> to the UML kernel, how does it stop the running process, which is
> another process?

Look at switch_to_{skas,tt}.  In tt mode, it's one process waking another
by writing to a pipe, then sleeping by reading its own pipe.  In skas mode,
it's a longjmp and a memory switch.

				Jeff


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-16 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-16 14:30 [uml-devel] The UML scheduler Young Koh
2005-05-16 15:06 ` Jeff Dike
2005-05-16 15:37   ` Young Koh
2005-05-16 16:58     ` Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.