מערכות מידע נושאים מתקדמים בתכנות- עדכני

לחץ כאן לכל השאלות

מה הפלט של התוכנית הבאה?

1
done
Explanation: For (a), the parent thread keep executing until it reaches the barrier. The child thread are then scheduled. For (b), thread scheduler scheduler thread1. Once it reaches the barrier, the parent thread is scheduled. Once parent thread reached the barrier, thread2 is scheduled. For (c), Both the child thread are scheduled. Finally when each of the child threads reach the barrier, the parent thread is scheduled.
by
מיין לפי
by Omer Laufer
Omer Laufer 0 נקודות · יותר מ-6 חודשים
מוניטין: 1
למה זה התשובה?
by
by Guy Biton
Guy Biton 0 נקודות · יותר מ-6 חודשים
מוניטין: 24
נראה לי הכוונה זה שזה יכולה להיות כל אחת מהאופציות, השאלה מי יקבל את הזמן ביצוע קודם על ידי scheduler, אופציה ראשונה אומרת שקודם הmain קיבל ואז 2 הטרדים. אופציה שנייה טרד אחד main ואז טרד נוסף, אופציה שלישית 2 הטרדים ואז ה main
by

* השאלה נוספה בתאריך: 21-07-2019