i just finished a bit of framework that lets landslide see a "reflection" of the guest kernel's scheduler. soon, we'll be able to bend the guest's scheduling patterns to our whims, but for now, here's what we see when passively viewing the runqueue during the boot-up sequence (comments are my own, post-hoc):
simics> c
switched threads 1 -> -268370093 at 0x1009cf // garbage from init i haven't cleaned up yet
switched threads -268370093 -> 1 at 0x105385 // it's research-quality; give me a break
switched threads 1 -> 2 at 0x102f7b
new agent 2 at eip 0x105613 -- [2, 1] // shell fork()ed from init
agent 2 gone at eip 0x1056d5 -- [1] // shell blocks on readline()
agent 1 gone at eip 0x1056d4 -- [] // take init off RQ to schedule
switched threads 2 -> 1 at 0x102f7b
new agent 1 at eip 0x105613 -- [1] // init back on RQ after context-switch
agent 1 gone at eip 0x1056d5 -- [] // init blocks on wait()
i also use the term "agent" to refer to a thread that is currently on the runqueue (i.e. can be context-switched to at any moment); it is recycled terminology from dBug.
anyway, so if i type a command at the prompt, it continues:
new agent 2 at eip 0x105613 -- [2] // kbd handler sees "\n" and puts shell on RQ
agent 2 gone at eip 0x1056d4 -- [] // take shell off RQ to schedule
switched threads 1 -> 2 at 0x102f7b
new agent 2 at eip 0x105613 -- [2] // shell back on RQ after context-switch
switched threads 2 -> 3 at 0x102f7b
new agent 3 at eip 0x105613 -- [3, 2] // shell forks "juggle" process
switched threads 3 -> 4 at 0x102f7b
new agent 4 at eip 0x105613 -- [4, 3, 2] // "juggle" forks its own child threads...
...and so on.
No comments:
Post a Comment