How can a thread map memory to itself

Björn Döbel doebel at os.inf.tu-dresden.de
Wed Aug 20 22:15:38 CEST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

let us stay on the list - others might be interested in your problems
as well.

> Thank you very much, I tried what you said, But met a problem. In
> my test case, I have multiple threads within the same task, but 
> running on different cores, doing capability mapping to itself. 
> Each thread runs in a tight loop, which are 1,000,000 iterations.

How does this look like in code?

> The problem is after some while, the program did not make any
> progress. And this only happens when I have more than 5 threads. If
> I only have 2 or 3 threads, they work well. I have no idea how to
> debug this. Could you give me some hints?

Fiasco has a kernel debugger which you can enter by pressing <ESC> at
runtime. Pressing <h> will give you a list of commands.

Some interesting ones:

lp -> lists all present threads. It will show you thread IDs, on
      which CPU they are running, what address space they belong
      to and which state they are in.

t<id> -> gives you information about a specific thread with a given
         debug ID (the one from the lp list). Here you will see at which
         user or kernel EIP the thread is right now. This may help you
         figuring out where in the code your threads get stuck.

Q -> gives you a list of all known kernel objects. Use this for instance
     to find the task your program is running in.

dt<id> <addr> -> dump the address space of a given task starting at
                 address <addr>


Good luck!
Bjoern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlP1AeYACgkQP5ijxgQLUNkq7QCeJ5HtstwWw3PAIQTrsXpBh9xT
5m0An04wkCPcYU2d5W6rPzBwCvMBD/1S
=0wdI
-----END PGP SIGNATURE-----



More information about the l4-hackers mailing list