[转载]Kernel Locking中文版 Unreliable Guide To Locking

 

中文版下载:

http://bbs.chinaunix.net/attachment.php?aid=121706

英文版下载:

http://kernelbook.sourceforge.net/kernel-locking.pdf 

 

Unreliable Guide To Locking
Rusty Russell

   
    翻译:

        albcamus
  Copyright ?? 2003 Rusty Russell

  This documentation is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA For more details see the file COPYING in the
source distribution of Linux.

  目录
  1. 介绍
  2. 并发带来的问题

  2.1. 竞态条件与临界区

  3. Linux内核中的锁

  3.1. 两种主要类型的锁:自旋锁与信号量
  3.2. 锁和单处理器内核
  3.3. 只在用户上下文加锁
  3.4. 在用户上下文与Softirqs之间加锁
  3.5. 在用户上下文与Tasklets之间加锁
  3.6. 在用户上下文与Timers之间加锁
  3.7. 在Tasklets/Timers之间加锁

  3.7.1. 同一个Tasklet/Timer
  3.7.2. 不同的Tasklet/Timer

  3.8. 在Softirqs之间加锁

  3.8.1. 同一个Softirq
  3.8.2. 不同的Softirqs

  4. 硬中断上下文

  4.1. 在硬中断服务例程与Softirqs/Tasklets之间加锁
  4.2. 在两个硬中断服务例程之间加锁

  5. 关于锁的使用的图表(Cheat Sheet For Locking)

  5.1. 关于最低要求的表

  6. 常见的例子

  6.1. 都在用户上下文
  6.2. 从中断上下文中访问
  6.3. 把对象暴露在文件之外

  6.3.1. 为引用计数使用原子操作

  6.4. 保护对象自身

  7. 常见问题

  7.1. 死锁:简单与高级
  7.2. 避免死锁

  7.2.1. 对死锁的“防备过当”

  7.3. Timer竞态:在内核中做一次游戏
  7.4. 混乱的SPARC处理器

  8. 加锁的速度

  8.1. 读写锁变体
  8.2. 避免锁的使用:读-复制-更新(Read Copy Update,RCU)
  8.3. Per-CPU数据
  8.4. 中断服务例程可能会使用哪些数据

  9. 中断里调用哪些函数是安全的?

  9.1. 一些可能睡眠的函数
  9.2. 一些不会睡眠的函数

  10. 进一步阅读
  11. 致谢
  术语(并翻译后记)

  图表:
  2-1. 预期结果
  2-2. 可能结果
  5-1. 加锁要求表
  7-1. 顺序

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值