1
$\begingroup$

Someone made a casual remark to me about the terminology of capabilities and capacities, in the context of threads, processors and runtime systems, particularly their theoretical modelling.

For example, in Haskell, an OS thread that is started to schedule work for a single logical processor (hardware thread) is called a capability. Where does this terminology come from? I'm not sure what it really means.

The person who made the casual remark thought that there is also the related concept of capacities, but neither of us are sure.

Anyone know about this? Or have any references for me?

$\endgroup$
  • 2
    $\begingroup$ I think that you are talking about the GHC terminology “capability,” which has nothing to do with “capacity” as far as I know. In my opinion, the question is complicated in an unnecessary way because you are mixing two unrelated terms. $\endgroup$ – Tsuyoshi Ito Dec 20 '11 at 14:37
  • $\begingroup$ Yeah, I know that it is a term used in GHC. I say that in the question. I want to know where it came from -- is it from the literature in which case does it have a formal definition, or is it just a random word that they appropriated? If so, what were they trying to say that thread wouldn't? My colleague thinks that he has seen a related term capacity in the literature, but can't remember where. $\endgroup$ – Steve Swiss Dec 20 '11 at 15:09
  • $\begingroup$ Why don't you ask the Haskell people? $\endgroup$ – Raphael Dec 20 '11 at 17:23
  • $\begingroup$ You only mention Haskell in the question. Do not confuse a language with one of its implementations. $\endgroup$ – Tsuyoshi Ito Dec 20 '11 at 23:11
  • 3
    $\begingroup$ You thought that the term “capability” is something universal to Haskell. I claimed in my first comment that it is a GHC-specific terminology. You responded, “Yeah, I know that it is a term used in GHC. I say that in the question.” You are completely missing the point because you are confusing Haskell with GHC. $\endgroup$ – Tsuyoshi Ito Dec 21 '11 at 13:26
1
$\begingroup$

A comment in capability.h says

// The Task currently holding this Capability.  This task has
// exclusive access to the contents of this Capability (apart from
// returning_tasks_hd/returning_tasks_tl).

This looks to be an access control mechanism.

In the security literature, the word capability is used to refer to a way of controlling access. The dominant usage is as a reference to an object that encapsulates authority such that denying access to the object denies access to that authority but there are others as explained at "Capability Myths Demolished"

We know of no security mechanisms outside of the object-capability model that have described themselves using the word capability except for “POSIX capabilities”, “Netscape capabilities”, and “split capabilities” [14]. POSIX capabilities are not generally described as “capability-based security”. The “Netscape capabilities” extensions to Java were fairly short-lived and have not been presented in the research literature as a capability system. Moreover, both “POSIX capabilities” and “Netscape capabilities” have never been presented as security mechanisms that can stand on their own, instead only serving as an extension to existing security systems. The split capabilities model is explicitly presented in contrast to the pure capability model [14].

The Haskell usage is not an object-capability model. The pointer from a task to a capability would have to go the other way, and probably be proxied through a revokable wrapper to qualify as a capability in the sense explained above.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.