What is context?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What is "context"?

In the documentation I saw different mention of context like:
interrupt, nmi, softirq, tasklet, timer, process, kernel, user,
ethernet networking etc.

>From the CPU standpoint, we have different CPL (or ring 0 and 3).
And at every ring level, we have interrupt vs non-interrupt mode of
operation.    Basically it is just interrupt vs non-interrupt context.
  So this means that kernel/softirq/tasklet are all the same context -
non-interrupt mode running at ring0, but seemingly everyone treat it
as different context - is that so?   If so, then what differentiate
tasklet vs other context, from hardware perspective?

Based on this I cannot understand this:

Eg, in Documentation/mutex-design.txt:

"The stricter mutex API means you cannot use mutexes the same way you
can use semaphores: e.g. they cannot be used from an interrupt context,
nor can they be unlocked from a different context that which acquired
it." ===> last time is not understandable.    What is the meaning of
this "context"?  Why?  What problem can it give rise to if not
followed?

My understanding is (from above) is that there are only two context -
interrupt vs non-interrupt mode.   So first sentence already eliminate
the possibility of interrupt context, leaving only non-interrupt mode.
  But the line "different context that which acquired it" implied
different context exists?

-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux