首页 > 技术相关 > 存储一致性总结

存储一致性总结

2011年5月6日 发表评论 阅读评论

严格一致性其实从物理定律上来说就是不能实现的(它要求写操作能够瞬间传播出去)。

顺序一致性是可行的,在编程人员中很流行且广泛应用。但是它的性能很差。解决这个问题的方法是放宽一致性的模型。下表以限制程度递减的顺序给出了几种可能的模型。

一致性 说明
严格 所有的共享访问事件都有绝对时间顺序
顺序 所有进程都以相同的顺序检测到所有的共享访问事件
因果 所有进程都以相同的顺序检测到所有因果联系的事件
处理器 PRAM一致性+存储相关性
PRAM 所有的进程按照预定的顺序检测到来自一个处理器的写操作,来自其他处理器的写操作不必以相同的顺序出现

另一措施是引入了明确的同步变量,正如弱一致性释放一致性入口一致性所做的那样。下表总结了这三种模式。当进程对普通共享数据变量执行操作时,不能保证它们何时对于其他进程是可见的。只有当访问同步变量后,变化才能传播出去。

一致性 说明
同步完成后,共享数据才可能保持一致
释放 当离开临界区时,共享数据就保持一致
入口 当进入临界区时,和该临界区相关的共享数据保持一致

这三种模型的不同在于其同步机制如何工作。但在这三种情况中,它们都可在一个临界区中执行多重的读写操作,而不引起数据传输。当临界区的操作完成后,最后结果或者广播发送给其他进程或准备就绪在其他进程需要时再发送出去。



本文作者: Sigma    在新浪微博关注SigmaSigmaWeibo    RSS订阅本博客
本文链接: http://www.sigma.me/2011/05/06/memory-consistency-summary.html
本博客采用知识共享署名—非商业性-禁止演绎使用3.0协议进行许可,转载请保留作者和原文链接。

  1. 2011年5月9日03:23 | #1

    多线程编程?

  2. 2011年5月11日01:56 | #2

    LZ备案拍照了么?

  3. 2011年5月12日07:01 | #4

    写的不错,很受用!

  4. 2019年1月14日21:40 | #5

    I am commenting to make you know what a brilliant discovery my friend’s girl obtained reading your webblog. She picked up some pieces, most notably what it’s like to possess an awesome giving character to let other people easily know a number of complex subject matter. You truly surpassed people’s expectations. Thank you for offering the productive, dependable, informative and also fun tips about this topic to Evelyn.

  5. 2019年1月15日06:47 | #6

    I wish to show my passion for your kind-heartedness in support of persons who need help on that matter. Your very own dedication to getting the solution around had been really beneficial and has truly made guys and women just like me to attain their dreams. Your amazing useful suggestions signifies so much to me and additionally to my office colleagues. Thank you; from each one of us.

  6. 2019年1月15日15:06 | #7

    I wanted to put you this tiny observation to be able to thank you very much again considering the superb tricks you have contributed in this article. It has been quite incredibly generous of people like you to give freely all a few individuals could have supplied as an e-book to generate some profit for themselves, specifically since you might well have tried it in the event you wanted. The suggestions in addition served to be a good way to realize that other people online have the identical passion like mine to find out many more when considering this problem. Certainly there are numerous more pleasant occasions in the future for people who scan your site.

  7. 2019年1月16日01:09 | #8

    My wife and i were so comfortable John managed to do his research through the precious recommendations he discovered in your weblog. It is now and again perplexing to simply continually be offering secrets other folks could have been selling. And we understand we have got you to be grateful to for that. The most important explanations you’ve made, the easy web site menu, the friendships your site aid to create – it’s got mostly incredible, and it’s really assisting our son in addition to us reckon that the article is excellent, which is especially indispensable. Many thanks for everything!

  8. 2019年1月16日08:40 | #9

    I must show some thanks to this writer just for rescuing me from such a circumstance. Right after surfing around through the internet and finding basics that were not helpful, I thought my life was gone. Being alive without the presence of solutions to the issues you have solved as a result of your good short article is a crucial case, and those which may have in a wrong way damaged my entire career if I hadn’t noticed your blog post. That know-how and kindness in taking care of every part was helpful. I am not sure what I would’ve done if I had not come across such a point like this. I can at this point look forward to my future. Thanks so much for the expert and sensible guide. I won’t think twice to refer your web page to anybody who ought to have guidance about this subject matter.

  9. 2019年1月16日17:37 | #10

    I wanted to post a brief remark in order to appreciate you for all of the wonderful hints you are giving out here. My considerable internet lookup has now been compensated with sensible ideas to write about with my co-workers. I would believe that most of us readers actually are undoubtedly lucky to dwell in a perfect website with very many wonderful people with very helpful tactics. I feel quite happy to have discovered your entire web pages and look forward to so many more entertaining minutes reading here. Thanks a lot once more for all the details.

  10. 2019年1月17日04:58 | #11

    My wife and i got thrilled that Chris managed to do his researching because of the precious recommendations he made from your own web page. It’s not at all simplistic to just find yourself making a gift of information people today could have been making money from. And now we do know we need you to appreciate because of that. The type of explanations you’ve made, the straightforward website menu, the relationships you assist to promote – it is many amazing, and it’s leading our son in addition to our family imagine that this theme is awesome, and that is rather indispensable. Thank you for all!

  11. 2019年1月17日11:54 | #12

    I in addition to my pals were actually reading the good things on the website and the sudden developed an awful suspicion I never expressed respect to the web site owner for those techniques. These men are actually totally passionate to learn all of them and have in effect clearly been tapping into these things. Thank you for truly being really kind and also for figuring out this sort of remarkable ideas most people are really desperate to learn about. My personal honest apologies for not expressing appreciation to sooner.

  12. 2019年1月17日21:18 | #13

    I needed to put you this little bit of observation in order to thank you again just for the breathtaking knowledge you have documented in this case. It has been so generous with people like you giving publicly all that a few people could have offered for sale as an electronic book to make some cash for themselves, particularly now that you might have tried it in case you decided. These things also acted like a easy way to know that other people online have similar fervor really like my personal own to know significantly more concerning this condition. I’m sure there are several more enjoyable sessions up front for those who see your blog.

  13. 2019年1月18日06:08 | #14

    Thank you so much for providing individuals with remarkably remarkable chance to read critical reviews from here. It really is so brilliant and as well , packed with a great time for me personally and my office co-workers to visit your website at the least three times every week to find out the newest tips you have. And lastly, we’re certainly amazed concerning the very good principles served by you. Some two tips in this posting are ultimately the best we’ve had.

  14. 2019年1月18日13:20 | #15

    I actually wanted to send a brief comment so as to express gratitude to you for those unique tips and tricks you are giving out on this website. My time-consuming internet investigation has at the end of the day been paid with high-quality points to write about with my colleagues. I would assert that many of us website visitors actually are very much blessed to exist in a wonderful network with so many special people with helpful hints. I feel really privileged to have used your entire website and look forward to so many more thrilling times reading here. Thank you again for all the details.

  15. 2019年1月18日22:16 | #16

    I precisely wished to say thanks once more. I am not sure the things that I would’ve taken care of without the creative concepts discussed by you over such concern. It actually was an absolute frightening difficulty for me, but encountering this expert approach you solved the issue took me to leap over contentment. I’m thankful for the guidance and sincerely hope you find out what an amazing job your are getting into educating the mediocre ones all through your web page. More than likely you haven’t met any of us.

  16. 2019年1月19日06:15 | #17

    My wife and i have been so fulfilled Emmanuel could carry out his web research with the precious recommendations he grabbed from your very own web pages. It is now and again perplexing to simply be releasing concepts others could have been trying to sell. Therefore we understand we have got you to give thanks to for that. The explanations you’ve made, the straightforward site navigation, the friendships you make it easier to engender – it is everything terrific, and it’s making our son and our family understand this idea is pleasurable, and that’s especially serious. Many thanks for everything!

  17. 2019年1月19日13:40 | #18

    I just wanted to write a brief note so as to express gratitude to you for the precious tips and tricks you are sharing at this site. My incredibly long internet research has at the end been paid with beneficial points to share with my friends. I would declare that most of us website visitors are unquestionably blessed to exist in a really good site with so many marvellous people with great points. I feel rather lucky to have seen your web page and look forward to plenty of more fabulous minutes reading here. Thanks once again for everything.

  18. 2019年1月19日23:50 | #19

    I’m also writing to let you understand of the fine encounter my child developed studying your blog. She realized several pieces, which included how it is like to possess a very effective coaching style to get the rest with ease know various hard to do matters. You actually surpassed people’s desires. Thanks for churning out these interesting, trusted, revealing and even unique tips about that topic to Lizeth.

  19. 2019年1月20日00:08 | #20

    I’m just commenting to let you know what a excellent encounter my wife’s princess developed visiting yuor web blog. She came to find too many pieces, which include how it is like to possess an incredible coaching style to have the rest without problems comprehend several advanced things. You actually exceeded my expected results. Thanks for imparting these priceless, healthy, informative and unique thoughts on the topic to Gloria.

  20. 2019年1月20日07:00 | #21

    My spouse and i felt so comfortable when Peter managed to complete his investigation with the precious recommendations he discovered from your very own blog. It is now and again perplexing to just happen to be giving for free solutions which often a number of people have been making money from. And now we consider we need you to appreciate for this. Most of the explanations you’ve made, the easy web site menu, the friendships you can make it easier to engender – it’s got mostly great, and it’s helping our son in addition to the family believe that the concept is cool, which is certainly highly important. Many thanks for all!

  21. 2019年1月20日15:10 | #22

    I enjoy you because of every one of your effort on this website. Debby enjoys making time for research and it is simple to grasp why. My spouse and i learn all about the lively method you convey very useful ideas by means of the website and in addition foster participation from other ones on that concern then our princess is truly being taught a lot. Take pleasure in the rest of the new year. You have been carrying out a great job.

  22. 2019年1月21日01:11 | #23

    I wish to express my love for your kind-heartedness in support of those individuals that actually need assistance with this particular subject. Your very own dedication to getting the solution around appeared to be remarkably informative and has continuously enabled most people much like me to arrive at their pursuits. Your own informative useful information denotes so much to me and much more to my mates. Thank you; from all of us.

  23. 2019年1月21日07:46 | #24

    I not to mention my buddies appeared to be digesting the excellent solutions found on your web page and all of a sudden I got a terrible suspicion I had not thanked the website owner for those tips. All the ladies appeared to be for this reason joyful to read through them and have definitely been loving them. Appreciation for indeed being so considerate and also for getting variety of tremendous areas millions of individuals are really needing to understand about. My personal sincere regret for not expressing appreciation to you sooner.

  24. 2019年1月21日14:55 | #25

    I needed to create you this little bit of observation to finally thank you so much yet again for all the great basics you’ve contributed above. It is so tremendously open-handed of you to present extensively just what a lot of people could possibly have offered for sale for an e book to make some cash for themselves, even more so considering the fact that you might have done it in the event you decided. These techniques also acted to become easy way to recognize that the rest have a similar eagerness just like mine to learn somewhat more regarding this matter. I am sure there are lots of more enjoyable occasions up front for folks who see your blog post.

  25. 2019年1月22日00:51 | #26

    I would like to show my appreciation to you for rescuing me from such a incident. Because of exploring through the internet and meeting things which were not beneficial, I believed my life was done. Existing without the strategies to the issues you have solved all through your main guide is a serious case, as well as the ones that could have adversely damaged my career if I hadn’t encountered your site. Your own mastery and kindness in taking care of all the things was invaluable. I don’t know what I would have done if I hadn’t encountered such a point like this. I can also at this time look forward to my future. Thanks very much for this skilled and effective help. I will not be reluctant to recommend your web site to anyone who ought to have care about this area.

  26. 2019年1月22日09:06 | #27

    I must show thanks to this writer just for rescuing me from this type of circumstance. Right after scouting throughout the internet and meeting views which were not beneficial, I believed my life was done. Existing devoid of the strategies to the problems you’ve resolved by means of your entire article content is a serious case, as well as the kind that could have in a wrong way affected my entire career if I had not noticed your web site. Your main ability and kindness in touching the whole thing was very helpful. I am not sure what I would’ve done if I had not discovered such a step like this. I’m able to at this point look ahead to my future. Thank you so much for your skilled and amazing help. I will not hesitate to endorse the blog to anybody who desires care on this issue.

  27. 2019年1月22日17:17 | #28

    I enjoy you because of all of your efforts on this website. My daughter really likes managing investigation and it’s simple to grasp why. A number of us hear all concerning the lively way you convey important secrets on the web site and in addition welcome response from other ones about this subject matter plus our own girl is truly discovering a lot. Have fun with the rest of the year. You are performing a powerful job.

  28. 2019年1月22日21:16 | #29

    I needed to write you one very small note to finally give thanks once again for all the wonderful tips you’ve shown above. It is so shockingly generous with people like you to give unreservedly what exactly a few people could possibly have offered for sale as an ebook to get some profit for themselves, even more so given that you might have done it in the event you considered necessary. Those good ideas likewise acted to be the fantastic way to be aware that some people have the same desire really like mine to know more and more on the topic of this condition. Certainly there are millions of more pleasurable times up front for many who discover your blog.

  1. 本文目前尚无任何 trackbacks 和 pingbacks.

无觅相关文章插件,快速提升流量