没有合适的资源?快使用搜索试试~ 我知道了~
现代操作系统课件:Chapter2-Interprocess Communication.ppt
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 41 浏览量
2022-06-16
14:17:38
上传
评论
收藏 4.21MB PPT 举报
温馨提示
试读
64页
现代操作系统课件:Chapter2-Interprocess Communication.ppt
资源推荐
资源详情
资源评论
Modern Operating Systems
Chapter 2 – Interprocess
Communication
Contents of this lecture
2.3 Interprocess Communication
Race Conditions
Critical Region and Mutual Exclusion
Mutual Exclusion Using Busy Waiting
Sleep and Wakeup
Semaphores
Monitors
Message Passing
2.5 Classic IPC Problems
Summary
2.3 Interprocess Communication
2.5 Classic IPC Problems
Summary
Inter-Process Communication
Communication
Pass information to each other
UNIX pipe (special file)
e.g. $ sort < file1|grep scut
Mutual Exclusion
Keep each other’s hair
Synchronization
Proper sequencing
The last one also applies to threads
A B
A Simple Example (1)
A function to withdraw money from a bank account:
int withdraw (account, amount) {
balance = get_balance (account);
balance = balance - amount;
put_balance (account, balance);
return balance;
}
Now suppose that you and your roommate share a bank
account with a balance of ¥ 1500 (this is not
necessarily a good idea...)
What happens if you both go to separate ATM
machines, and simultaneously withdraw ¥ 100 from
the account?
剩余63页未读,继续阅读
资源评论
智慧安全方案
- 粉丝: 3614
- 资源: 59万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功