close
Blogtrottr
批踢踢實業坊 ask 板
[請問] 軟體的互斥鎖問題
Jul 11th 2013, 23:15, by luxylu

作者luxylu ( 露西露 )

站內ask

標題[請問] 軟體的互斥鎖問題

時間Thu Jul 11 23:15:33 2013

/* program 1 */ turn = 1; Q1 = TRUE; while (turn == 1 && Q2 == TRUE); Critical Section; Q1 = FALSE; /* program 2 */ turn = 2; Q2 = TRUE; while (turn == 2 && Q1 == TRUE); Critical Section; Q2 = FALSE; 這兩個程式用一個processor執行下,會有互斥以進入Critical section時 請問什麼情況下此互斥鎖會失效呢? 查過了Dekker演算法但看不懂如何操作 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.109.41.16

Raist:...一定要問這種高難度的問題來質疑我的智商嗎??? (淚奔~) 07/11 23:24

luxylu:我也不想阿.....已經查了三天資料還是看不懂 07/11 23:28

wuliou:有第三個process更改了turn的值? 07/11 23:32

wuliou:或是碰到非atomic指令? 07/11 23:32

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 qhhm2mx5usb62 的頭像
    qhhm2mx5usb62

    線上遊戲排行榜2013/2014,進擊的巨人線上看,candy crush saga外掛,正妹寫真三圍

    qhhm2mx5usb62 發表在 痞客邦 留言(0) 人氣()