[comp.os.mach] execve in Mach 2.5

philk@tictoc.cis.ohio-state.edu (Phillip E Krueger) (03/01/90)

Under Mach 2.5, what task does execve belong to (i.e. what task and
thread are considered current when execve is executed)?  The mach task?
The user task whose thread called it?

Thanks,
  -- Phil

af@spice.cs.cmu.edu (Alessandro Forin) (03/02/90)

In article <77747@tut.cis.ohio-state.edu>, philk@tictoc.cis.ohio-state.edu (Phillip E Krueger) writes:
> Under Mach 2.5, what task does execve belong to (i.e. what task and
> thread are considered current when execve is executed)?  The mach task?
> The user task whose thread called it?
> 
> Thanks,
>   -- Phil

Mach 2.5 supports Unix in-kernel.  This means that the Mach abstractions 
_and_ the Unix abstractions co-exist, and each one tries very hard not to
interfere with the other.

The Unix semantics is provided by equating

	Unix-process ==  This-thread + Its-task

which in the case of execve means:
	1) terminate all other threads in the same task of the invoking
	   thread
	2) reshape the task's address space as described in the executable
	   image (text+data+implicit-stack)
	3) restart this thread at the PC defined in the executable image.

Additional clarifications:
1- the relation thread->task never changes once established (at thread
   creation time)
2- Unix primitives never take Mach entities as parameters

sandro-