Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

OS lecture 4

TermDefinition
Mutual Exclusion מניעה הדדית, נועדה למנוע מרוצים. מניעת גישה לאותו משאב משותף בו"ז.
Race Condition עבור המתכנת - ה-thread-ים רצים במקביל, למעשה זה לא כך ומכיוון שהמשאבים משותפים יכול להיווצר מצב ש-thread1 התחיל לשנות משאב משותף ובאמצע הביצוע הועבר לthread2 שמנסה גם הוא לשנות משאב משותף. התוצאה- מרוץ מי יתוזמן קודם וישנה את המשאב.
Busy Wait/Spin-Lock לולאה כמו ;( while(lock!=0 החוט ממשיך לעבוד בזמן שהוא מחכה. אם מממשים את ה-lock של פתרון 1 ל-mutex באמצעות busy wait אז נוצר spin lock.
Peterson's Algorithm אלג' ליצירת מניעה הדדית
TSL Instruction פתרון בחומרה למניעה הדדית- TSL זו פקודה אטומית (פקודה יחידה-> אי אפשר לקבל באמצע פסיקה). TSL RX,lock מבצעת 2 דברים: (1) שמה את lock מהזכרון לרגיסטר (2)משנה את התא בזיכרון ל-1 (lock=1). [קוד לlock עם פק' TSL שקף 23]
Priority Inversion מצב שקורה גם בפתרון טוב למניעה הדדית: כשיש עדיפות סטטית ב-OS. ננית ש-L הצליח להכנס לקטע קריטי. בגלל העדיפות ה-OS תתזמן דווקא את H וככה L לא יתקדם ולא יצא מהקטע הקריטי (וגם H לא יוכל להכנס)-> שניהם תקועים.
Producer-Concumer Problem תור (FIFO) בגודל סופי ושני חוטים - אחד מייצר ושם בתור, שני צורך מהתור. יצרן-צריך לחכות אם התור מלא, צרכן-לחכות אם התור ריק.
Semaphore מנגנון של OS לפתרון בעיית יצרן-צרכן. יש פונקציית Up ופונקציית Down
Binary Semaphore/Mutex סוג של semaphore שמשמש למניעה הדדית. Semaphore=1 ואז בכניסה לקטע קריטי- down ביצוע קטע ואז up.
Message Passing כששני תהליכים רוצים לתקשר כמו יצרן-צרכן. הבעיה- אין להם זכרון משותף. הפתרון- send,recv שני sys calls של העברת הודעות.
Read-copy-update שיטה לעדכון מבנה נתונים (למשל עץ) באופן בטוח ללא שימוש ב-locks.
barrier ממתין עד שכל התהליכים יגיעו לנקודה מסויימת, ורק אז כולם יכולים להמשיך
livelock שני תהליכים מבצעים את אותן פעולות בצורה מחזורית, בלי לבצע שום פעולה "משמעותית". למשל, בפילוסופים הסועדים, רק מרימים ומורידים מזלגות בלי לאכול
Deadlock קבוצה של תהליכים נמצאת ב-deadlock אם כל-אחד מהתהליכים בקבוצה מחכה לארוע שרק תהליך אחר בקבוצה יכול לגרום לו.
Created by: Idan05
Popular Engineering sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards