proecess間的mutual exclusive RW - Linux
By Charlotte
at 2010-03-17T21:10
at 2010-03-17T21:10
Table of Contents
請教一下
一篇文章
讓十個process去read
一個process一次讀一列出來
怎麼在shell script下保證這十個process不會讀到同樣的列
EX:每支process的內容
while(`cat file | wc -l`)
head -n1 file; sed -i '1d' file
end
如果在head -n1 file時發生context switch
有沒有可能在sed還沒把第一行刪掉時另一個process也拿到同一行?
--
Tags:
Linux
All Comments
By Sierra Rose
at 2010-03-22T19:14
at 2010-03-22T19:14
By Ursula
at 2010-03-25T11:03
at 2010-03-25T11:03
Related Posts
創立文字檔
By William
at 2010-03-17T17:13
at 2010-03-17T17:13
如何在特定時間區間中執行不同的指令?
By Dorothy
at 2010-03-17T11:53
at 2010-03-17T11:53
製作作業系統?
By Zora
at 2010-03-17T11:22
at 2010-03-17T11:22
關於Fedora 9無法切換中文語言
By Andy
at 2010-03-17T02:44
at 2010-03-17T02:44
Synaptic 無法取得排他鎖定
By Carol
at 2010-03-17T00:57
at 2010-03-17T00:57