28.11.2014 Views

System call - Processi, thread

System call - Processi, thread

System call - Processi, thread

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Terminazione di <strong>thread</strong>s<br />

• Normalmente e` necessario eseguire la<br />

p<strong>thread</strong>_join per ogni <strong>thread</strong> che termina la<br />

sua esecuzione, altrimenti rimangono allocate le<br />

aree di memoria ad esso assegnate.<br />

• In alternativa si puo` “staccare” il <strong>thread</strong> dagli<br />

altri con:<br />

int p<strong>thread</strong>_detach(p<strong>thread</strong>_t th);<br />

‣ il <strong>thread</strong> rilascia automaticamente le risorse assegnatagli quando<br />

termina.<br />

M-fosset - Sistemi Operativi 2004-2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!