首页 > 技术相关 > 存储一致性之顺序一致性(Sequential consistency)

存储一致性之顺序一致性(Sequential consistency)

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

定义(Lamport ,1979):

the result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified by its program

中译为:

任意一次执行的结果都像所有处理器的操作以某种顺序的次序执行所得到的一样,而且各处理器的操作都按照各自程序所指定的次序出现在这个顺序中。

这个定义意味着,当程序在各个机器上并行运行时,任何一种有效的交错存储器访问顺序都是可认可的行为,但所有处理器必须看见的是同样的访问顺序。如果一个进程(处理器)看见的是一种交错,另一进程看见的是另一种交错,则这样的存储器不是一个顺序一致性的存储器。然而,同一程序再次并行运行,其存储器访问的交错次序会不同于上次的交错次序,这是允许的。在一块存储器中,若一个进程(或处理机)看到一种交错,另一进程看到另一个交错,这就不是顺序一致存储器。注意,这与时间无关,没有最近存入的概念。在这里,进程可以看到所有进程写,但只能看到本进程读。

在顺序一致性中衍生了一个可线性化概念:

线性化是一种弱于严格一致性但又强于顺序一致性的一致性模型。这种模型假设操作具有一个全局的时间戳。设TSop(x)表示在x上的操作op执行时的时间戳, op可以是读操作,也可以是写操作。如果TSop1(x)< TSop2(y),则在顺序一致性模型中的读/写操作顺序下,操作op1(x)必须在操作op2(y)之前。

线性化的数据存储也是顺序一致的。它们的区别在于:线性化是根据时间戳确定操作顺序的。在实际应用中,线性化主要用于并发算法的形式验证。线性化的实现比顺序一致性的实现开销更大。

最后,给一张顺序一致性的示意图:



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

  1. 2019年1月14日15:52 | #1

    I have to voice my affection for your generosity for folks that require help on that theme. Your special dedication to passing the message throughout appeared to be really interesting and have specifically helped professionals just like me to get to their goals. The informative suggestions means much a person like me and a whole lot more to my colleagues. Warm regards; from each one of us.

  2. 2019年1月15日02:53 | #2

    I simply desired to say thanks again. I’m not certain the things I would’ve implemented without the actual hints provided by you regarding this topic. This has been an absolute intimidating issue for me, however , witnessing this well-written way you resolved the issue made me to cry over joy. Now i am grateful for this guidance and in addition trust you find out what an amazing job that you’re providing instructing people all through your websites. Most probably you haven’t come across all of us.

  3. 2019年1月15日19:40 | #3

    I must express my thanks to the writer for bailing me out of this particular predicament. Because of exploring through the the web and obtaining views which are not helpful, I assumed my life was well over. Existing minus the strategies to the problems you’ve resolved by means of your website is a critical case, as well as those which may have in a wrong way damaged my entire career if I hadn’t encountered your site. Your mastery and kindness in maneuvering all things was excellent. I don’t know what I would’ve done if I hadn’t come upon such a point like this. I am able to at this moment relish my future. Thanks for your time very much for your expert and effective help. I will not hesitate to refer your web blog to any person who would like assistance on this situation.

  4. 2019年1月16日04:43 | #4

    I definitely wanted to send a small note in order to appreciate you for those splendid hints you are posting at this site. My time intensive internet search has now been paid with professional strategies to share with my family. I would assert that many of us site visitors are very much blessed to be in a superb network with very many brilliant people with beneficial opinions. I feel somewhat happy to have used your entire webpages and look forward to plenty of more pleasurable minutes reading here. Thank you once again for everything.

  5. 2019年1月16日12:22 | #5

    My wife and i ended up being now relieved John could deal with his analysis through the entire precious recommendations he had from your very own weblog. It’s not at all simplistic to simply be freely giving strategies that many some other people might have been selling. And we also keep in mind we now have the website owner to thank because of that. The explanations you have made, the easy site menu, the relationships you aid to instill – it’s got most impressive, and it is assisting our son and the family recognize that the situation is amusing, and that’s exceedingly serious. Thanks for all the pieces!

  6. 2019年1月16日23:10 | #6

    I would like to voice my gratitude for your generosity giving support to men and women who actually need help with this important theme. Your personal commitment to passing the solution across turned out to be amazingly advantageous and have always made people just like me to reach their targets. The helpful instruction means this much a person like me and substantially more to my colleagues. Thanks a ton; from each one of us.

  7. 2019年1月17日07:35 | #7

    I am just commenting to make you be aware of of the excellent discovery my child had reading through your web site. She picked up such a lot of things, with the inclusion of what it is like to have a very effective coaching heart to make folks with no trouble fully grasp specified complicated subject matter. You undoubtedly did more than readers’ desires. Thank you for imparting the informative, safe, edifying and cool tips on the topic to Emily.

  8. 2019年1月18日02:21 | #8

    I wish to show appreciation to the writer for bailing me out of this particular difficulty. As a result of exploring through the the web and meeting basics which were not productive, I figured my life was well over. Living without the answers to the issues you’ve solved by means of the site is a crucial case, and the ones which could have negatively affected my career if I hadn’t encountered your blog. That ability and kindness in taking care of the whole lot was invaluable. I don’t know what I would have done if I had not come upon such a thing like this. I am able to at this point relish my future. Thanks so much for the impressive and results-oriented guide. I won’t hesitate to endorse your web sites to any person who would need direction about this subject.

  9. 2019年1月18日09:23 | #9

    I simply wanted to post a brief word in order to appreciate you for all of the superb recommendations you are showing at this site. My long internet research has finally been compensated with professional details to talk about with my family members. I ‘d say that many of us website visitors are undoubtedly lucky to be in a fine website with very many special individuals with good methods. I feel very much grateful to have come across the web site and look forward to many more exciting minutes reading here. Thanks once more for a lot of things.

  10. 2019年1月18日11:00 | #10

    Thanks for all your valuable work on this web page. Kim loves working on investigations and it’s really obvious why. All of us hear all relating to the compelling method you provide efficient suggestions by means of this blog and as well strongly encourage response from website visitors on this subject matter plus my girl is without a doubt starting to learn a great deal. Take pleasure in the remaining portion of the new year. You’re conducting a first class job.

  11. 2019年1月18日17:07 | #11

    I enjoy you because of your entire work on this blog. Debby loves managing research and it’s really easy to understand why. Most of us know all about the compelling tactic you create advantageous guidelines through this website and therefore invigorate response from other ones on the idea and our own child is learning a whole lot. Enjoy the remaining portion of the year. You have been carrying out a powerful job.

  12. 2019年1月19日02:46 | #12

    Thank you so much for giving everyone an extraordinarily pleasant possiblity to read critical reviews from this site. It is usually very excellent and also stuffed with a good time for me and my office acquaintances to search your blog on the least 3 times every week to read through the fresh guidance you have got. And of course, I am usually impressed for the incredible techniques you serve. Certain 1 ideas in this post are essentially the simplest we have ever had.

  13. 2019年1月19日09:21 | #13

    Thanks for all your valuable efforts on this web page. My aunt takes pleasure in doing investigations and it’s really easy to understand why. I hear all concerning the compelling ways you produce both interesting and useful tactics by means of your web site and as well as increase response from others on the topic while our favorite child is without a doubt learning a great deal. Enjoy the rest of the new year. Your carrying out a fabulous job.

  14. 2019年1月20日03:29 | #14

    I wish to show my thanks to you for rescuing me from this particular problem. Right after browsing throughout the the net and finding ways that were not pleasant, I thought my life was gone. Being alive without the answers to the difficulties you’ve fixed through this guideline is a serious case, and those that would have badly damaged my career if I had not noticed the website. Your actual talents and kindness in handling the whole lot was invaluable. I don’t know what I would have done if I hadn’t encountered such a solution like this. I can now relish my future. Thank you so much for the high quality and results-oriented guide. I won’t be reluctant to suggest your web blog to any individual who will need assistance on this situation.

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

    Needed to send you a bit of observation to give many thanks over again regarding the lovely basics you have shown on this website. This has been so particularly open-handed with people like you giving freely what many people would have distributed for an e book to end up making some money for themselves, chiefly considering the fact that you could have done it if you desired. These good tips also acted to be the great way to comprehend many people have the identical fervor just like my personal own to know more related to this matter. I am sure there are many more enjoyable moments in the future for people who read through your blog post.

  16. 2019年1月20日19:39 | #16

    I have to show appreciation to you for rescuing me from such a instance. As a result of surfing through the the net and getting recommendations which are not powerful, I figured my life was well over. Living devoid of the strategies to the problems you’ve solved by means of the site is a crucial case, as well as the kind that would have badly affected my entire career if I hadn’t encountered your web blog. That know-how and kindness in handling all the pieces was very useful. I am not sure what I would’ve done if I hadn’t come across such a thing like this. It’s possible to at this point relish my future. Thanks a lot very much for this specialized and effective help. I won’t hesitate to refer your web blog to any person who should have recommendations about this subject.

  17. 2019年1月21日01:47 | #17

    I want to show appreciation to this writer for rescuing me from this type of condition. As a result of searching throughout the the net and seeing principles which are not helpful, I assumed my entire life was well over. Living without the presence of approaches to the problems you have solved by way of your entire post is a critical case, as well as the kind that could have in a negative way affected my career if I had not come across your website. Your own personal capability and kindness in controlling every aspect was valuable. I’m not sure what I would have done if I hadn’t come across such a point like this. I can at this moment look forward to my future. Thanks so much for your reliable and result oriented help. I will not think twice to refer the website to anybody who desires guidance on this problem.

  18. 2019年1月21日04:21 | #18

    I simply needed to say thanks once more. I do not know the things I could possibly have handled without those smart ideas provided by you over my problem. Completely was a frightening scenario for me personally, but finding out the specialized approach you solved that took me to weep with delight. Extremely thankful for the advice and in addition have high hopes you know what an amazing job you were accomplishing training the mediocre ones by way of your blog post. I’m certain you haven’t got to know all of us.

  19. 2019年1月21日06:42 | #19

    I precisely wished to say thanks once more. I am not sure the things I might have done without these techniques shown by you relating to this problem. It absolutely was a daunting dilemma in my view, but understanding your professional fashion you managed that forced me to jump with joy. Extremely thankful for the advice as well as believe you comprehend what a great job you’re doing teaching others through the use of your website. More than likely you have never got to know any of us.

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

    I’m commenting to make you know of the fantastic discovery my princess experienced checking yuor web blog. She picked up plenty of issues, not to mention how it is like to possess a great teaching character to get other folks without problems comprehend selected tricky things. You truly did more than visitors’ expected results. I appreciate you for supplying these important, trusted, edifying and unique guidance on the topic to Tanya.

  21. 2019年1月21日18:45 | #21

    I really wanted to send a brief comment to be able to express gratitude to you for all of the wonderful advice you are sharing on this site. My extended internet investigation has now been recognized with beneficial facts and techniques to write about with my family. I would express that we site visitors are truly fortunate to dwell in a decent network with very many awesome individuals with great ideas. I feel somewhat happy to have used your web page and look forward to plenty of more fun minutes reading here. Thanks a lot once more for all the details.

  22. 2019年1月22日13:01 | #22

    I wanted to develop a quick word so as to express gratitude to you for those awesome guidelines you are giving on this website. My extensive internet search has now been recognized with sensible strategies to talk about with my family members. I ‘d admit that most of us website visitors are really lucky to be in a remarkable place with very many marvellous individuals with very helpful advice. I feel pretty lucky to have come across the website page and look forward to some more enjoyable moments reading here. Thanks again for all the details.

  23. 2019年1月22日22:23 | #23

    My husband and i ended up being absolutely thankful when John could finish off his research through the ideas he had out of your site. It is now and again perplexing just to possibly be giving out information and facts a number of people may have been trying to sell. And we all remember we have the website owner to give thanks to for this. These explanations you’ve made, the easy website navigation, the relationships your site assist to promote – it’s got all wonderful, and it is helping our son in addition to the family understand the subject matter is amusing, and that’s really indispensable. Thank you for the whole thing!

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

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