Questions about struct task_struct
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Thu Aug 7 16:05:52 EDT 2014
On Wed, 06 Aug 2014 18:11:30 -0400, Nick Krause said:
> 1.volatile long state; Is this line like jiffies for timers with
> regards to the keyword volatile?
Why should it be any different?
> 2.void *stack; Is this a pointer to the kernel stack for the process
> related to the process
> that the structure is keeping data for and is void to make it an
> opaque data type? Is this
> normally an int or some other data type when called with most processes?
Under what conditions would it be an int? Think a bit.
> 3.unsigned int flags; /* per process flags, defined below */, My only
> question about this is
> what flags are there and are these the ifdef statements in the struct?
You explain what "ifdef statements in the struct" means, and maybe
we'll be able to explain that to you..
> 4.Why are we making the usage count atomic?(pretty obvious but real
> world reasons would be great)
If you don't understand why usage and reference counts need to be atomic,
you've got a *lot* to learn about race conditions.
> 8.What are the options like CONFIG_PREEMPT_RCU used for in terms of
> workloads or locking as I heard a lot about
> them on the threads on the lkml?
Start looking at Kconfig files. Most of them are documented.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140807/fe7c6827/attachment.bin
More information about the Kernelnewbies
mailing list