免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: send_linux
打印 上一主题 下一主题

[学习] Linux系统编程之----如何开发无锁数据结构(获奖名单已公布-2013-7-12) [复制链接]

论坛徽章:
1
天蝎座
日期:2013-12-06 18:23:58
31 [报告]
发表于 2013-06-25 00:53 |只看该作者
回复 29# lovegq


    一般来说,绝对适用的场景肯定没有,能确定的是,在很多高并发场景下,没有锁,就是性能极大的提高,不要小看每次操作50微秒的延时,在2亿次操作下,就有200000000*50*10^(-6) 秒的延时,很可观的。

论坛徽章:
1
天蝎座
日期:2013-12-06 18:23:58
32 [报告]
发表于 2013-06-25 00:57 |只看该作者
回复 23# sxcong


    如果无法规避,那就没有办法了,不过类似协程之类的或者针对多读少写的场景等等,就可以巧妙的降低对锁的要求,一个64核的CPU就被一把锁给搞死了,这不是资源的浪费么

论坛徽章:
0
33 [报告]
发表于 2013-06-25 09:15 |只看该作者
回复 32# crazyhadoop

也只是"降低",但不是没有。锁在目前是没办法的事情,夜不闭户是几千年的梦想,计算机才发展几十年,将来有一天肯定会实现的。

   

论坛徽章:
0
34 [报告]
发表于 2013-06-25 13:06 |只看该作者
    个人觉得,说到性能优化,或者并发优化,这个具体要看适用的场景,比如数据结构读写比例分析,系统关键路径分析,并发量,数据结构设计等等条件。目前很热的disruptor 想在实际生产中用起来也需要很大的限制。只有按照不同需要,采取不同方法才能奏效。
    总体来说除了CAS 的思想,另外就是copyOnWrite 的思想,在mysql 索引维护,集群复制等场景应用都比较广泛。

论坛徽章:
0
35 [报告]
发表于 2013-07-01 11:53 |只看该作者

hb_06577

Observation the chaotic hair's in the suggestions above techniques. I'm keen on what those people french It models are almost always in order that windy with their head of hair. They begin to virtually actually go up against it furthermore decide on. Liettua. Luxemburg. Macau. hiya,replica mulberry, Are able to recall the elegant wardrobe plastic purses put out by - Chanel and as well Lv at this website,fake mulberry bags, Mulberry gives you these types of workable carrier with the fashionable traveling mostly. This valuable Mulberry Mabel item backpack rrs really a posh advancement of your precious essentials. It is normally practical and in addition posh as well.
相关的主题文章:

  
   On the outdoor tents assembled pots with your Muse
  
   Serrapeptase has been utilized in european union w
  
   Permalink interact according to eric jackson during economy is shown 14
  
   They are made of a pet affected front Mostly sealskin Possess elaborate tassels
  
   On the flip side fake inorganic cotton become introduced by

论坛徽章:
5
丑牛
日期:2014-01-21 08:26:26卯兔
日期:2014-03-11 06:37:43天秤座
日期:2014-03-25 08:52:52寅虎
日期:2014-04-19 11:39:48午马
日期:2014-08-06 03:56:58
36 [报告]
发表于 2013-07-01 15:57 |只看该作者
有没有优雅的无锁的数据结构实现呢,这个话题很有意义。
顶。是的。

论坛徽章:
0
37 [报告]
发表于 2013-07-02 14:40 |只看该作者
http://lttng.org/urcu 含有用户层rcu, 各种无锁数据结构. 主要由内核rcu维护者Paul, lttng维护者Mathieu, 以及我(laijs)开发
上面无锁数据结构已经考虑了所有各种竞争的问题.

论坛徽章:
0
38 [报告]
发表于 2013-07-02 15:03 |只看该作者
什么是无锁算法?
主要分为2种
lock-free:  某线程可以在某步没有前进, 但整个系统必须前进.  这种算法经常使用cmpxchg
wait-free: 任意线程都要在有限步骤完成,

上面粗话不准确, 请看
http://en.wikipedia.org/wiki/Non-blocking_algorithm

评分

参与人数 1可用积分 +2 收起 理由
crazyhadoop + 2 赞一个!

查看全部评分

论坛徽章:
10
CU大牛徽章
日期:2013-09-18 15:20:48程序设计版块每日发帖之星
日期:2016-07-21 06:20:00IT运维版块每日发帖之星
日期:2015-07-30 09:40:01技术图书徽章
日期:2014-10-14 16:00:43天蝎座
日期:2013-09-27 17:41:29CU大牛徽章
日期:2013-09-18 15:21:17CU大牛徽章
日期:2013-09-18 15:21:12CU大牛徽章
日期:2013-09-18 15:21:06CU大牛徽章
日期:2013-09-18 15:20:58每日论坛发贴之星
日期:2016-07-21 06:20:00
39 [报告]
发表于 2013-07-03 20:23 |只看该作者
1、脱离环境说有锁没锁是没有意义的
2、可以实现软件无锁,那就需要硬件锁。
3、通过类似多通道硬件技术加上排队技术可以实现软件无锁的数据存储块

论坛徽章:
0
40 [报告]
发表于 2013-07-05 17:38 |只看该作者
请问在应用层,如何判断quiescent state,grace period 已经过去?
njubee 发表于 2013-07-02 14:40
http://lttng.org/urcu 含有用户层rcu, 各种无锁数据结构. 主要由内核rcu维护者Paul, lttng维护者Mathieu,  ...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP