[log in to unmask] (Roger Racine) wrote:
>I have seen some discussions about Ada tasks vs POSIX threads, and was
>surprised to see someone suggesting that they are not synonymous. The
>argument went something like this: Since tasks are built in to the
>language, the compiler knows about them. Since the compiler knows about
>them, there are times that the compiler can optimize them such that a new
>thread is not needed. Therefore there is a difference in terminology.
Regardless of the POSIX angle, various operating systems have something
they know as "threads". VMS has "DECthreads" and "Kernel Threads", while
the corresponding entities in Windows NT are "Fibers" and "Threads".
An important aspect of the Ada "task" is that it is defined by the
The Ada implementation controls how that "task" is mapped onto threads,
fibers, processes or "tasks" as viewed from the operating system
I think it is helpful that Ada uses the least-currently-favored term in
this regard, so that newcomers have to ask what a "task" is and are led
away from presuming it is exactly identical to some operating system
construct. At least they should understand that any binding to some
operating system construct will change with a new operating system
or Ada implementation (or potentially compilation mode).