Linuxproecess間的mutual exclusive RW - LinuxCharlotte · 2010-03-17Table of ContentsPostCommentsRelated Posts 請教一下 一篇文章 讓十個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也拿到同一行? -- LinuxAll CommentsSierra Rose2010-03-22像是是以指令"ipcs"來使用semaphore來管理process呢?Ursula2010-03-25多謝!! 另外找到一個 lockfile 好像蠻方便的Related Posts創立文字檔如何在特定時間區間中執行不同的指令?製作作業系統?關於Fedora 9無法切換中文語言Synaptic 無法取得排他鎖定
All Comments