Looking for Sisteme de operare 2025/2026, seria B test answers and solutions? Browse our comprehensive collection of verified answers for Sisteme de operare 2025/2026, seria B at moodle.cs.utcluj.ro.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Un thread poate fi terminat cu ajutorul funcției pthread_cancel în următoarele condiții:
Avem o funcție care primește 3 parametri și dorim ca această funcție să ruleze pe un thread separat. Ce ar trebui să facem?
Care este scopul utilizării funcției pthread_join?
Care este efectul apelării funcției pthread_create în forma de mai jos?pthread_t th;pthread_create(&th, NULL, thFunc, NULL);
În exemplul de cod de mai jos, care mesaj se va afișa primul?
void *threadFn(void *unused){ printf("Secondary thread\n"); return NULL;}
int main(){ pthread_t tid = -1;
if(pthread_create(&tid, NULL, threadFn, NULL) != 0){ perror("Error creating thread"); return 1; } pthread_join(tid, NULL); printf("Main thread\n"); return 0;}