Andreea Hodea <[email protected]> writes: > In legatura cu procesele pe Windows: conform laboratorului 3 "In > Windows nu se impune o *ierarhie* a proceselor în sistem ... Un proces > deține handle-uri ale proceselor create de el, însă handle-urile pot > fi *duplicate* între procese ceea ce duce la situația în care un > proces deține *handle-uri* ale unor procese care *nu sunt create de > el*". M-ar interesa ce concluzie se poate trage din afirmatiile > extrase cu privire la relatia parinte-copil intre procesele din > Windows?
Citez din Modern Operating Systems[1] (2.1.4 Process Hierarchies): --- In contrast, Windows does not have any concept of a process hierarchy. All processes are equal. The only place where there is something like a process hierarchy is that when a process is created, the parent is given a special token (called a handle) that it can use to control the child. However, it is free to pass this token to some other process, thus invalidating the hierarchy. Processes in UNIX cannot disinherit their children. --- O precizare similară găsești aici[2]: --- Windows processes on the other hand do not share a hierarchical relationship. Receiving the process handle and ID of the process it created, the creating process of a Windows system can maintain or simulate a hierarchical relationship if it is needed. The Windows operating system ordinarily treats all processes as belonging to the same generation. --- Nu există o relație părinte-copil. Există doar o relație de proces creator și proces creat. Handle-ul unui proces "creat" poate fi folosit și de procese diferite de "creator", motiv pentru care nu putem vorbi despre o ierarhie similară părinte-copil. Dacă dorești, poți afla ID-ul procesului "părinte/creator" din cadrul structurii PROCESSENTRT32[3]. [1] http://lovingod.host.sk/tanenbaum/Processes-and-threads.html [2] http://wiki.answers.com/Q/What_is_the_difference_between_Windows_and_Unix [3] http://msdn.microsoft.com/en-us/library/windows/desktop/ms684839(v=vs.85).aspx Răzvan _______________________________________________ http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii
