首页 > 技术相关 > 存储一致性之入口一致性(Entry Consistency)

存储一致性之入口一致性(Entry Consistency)

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

另一种使用临界区的一致模型是入口一致性(Bershad等,1993)。和释放一致性的两个变体一样,它也需要编程人员或编译器在临界区的首尾分别使用获取和释放操作。然而,与释放一致性不同的是,入口一致性要求每个普通的共享数据都要与某种同步变量如锁(lock)或屏障(barrier)相关联。

若并行访问数组元素,不同的数组元素就需要与不同的锁相联系。在对一个同步变量执行获取操作时,只保证与这个同步变量有关的共享数据一致。入口一致性与懒惰释放一致性不同在于,后者没有将共享数据与锁或屏障相连系,做获取操作时必须凭经验确认它需要哪些变量。

将每个同步变量与一组共享变量相连,可减少获取访问和释放访问一个同步变量时的开销,因为只有极少数共享变量需同步。它还允许包含不相关共享变量的多个临界区同时执行同步,增加了并行度。代价是将每个共享数据变量与同步变量相联系,这要求额外的开销,且增加了复杂度。这样编程更为复杂且更易于出错。

其定义为:

a memory exhibits entry consistency if it meets all the following conditions :

  1. An acquire access of a synchronization variable is not allowed to perform with respect to a process until all updates to the guarded shared data have been performed with respect to that process.
  2. Before an exclusive mode access to a synchronization variable by a process is allowed to perform with respect to that process, no other process may hold the synchronization variable, not even in nonexclusive mode.
  3. After an exclusive mode access to a synchronization variable has been performed, any other process next nonexclusive mode access to that synchronization variable may not be performed until it has performed with respect to that variable’s owner.

中译为:

当存储器满足下列所有条件时,就成为入口一致性存储器(Bershad和 Zekauskas,1991):

a. 只有某一进程的保护共享变量全部被更新以后,该进程方允许执行同步变量的获取访问;

b. 在一进程以互斥模式访问该进程的同步变量之前,不允许其他进程持有此同步变量,即使在非互斥模式下;

c. 在结束互斥模式下对一个同步变量的访问后,任意其他进程必须与该变量的拥有者核查,才能试图以非互斥模式访问该同步变量。

第一个条件说明,当进程执行获取访问时,该操作在所有保护的共享变量均更新后才能结束(即将控制权交给下一条语句)。也就是说,在获取操作时,所有被保护数据的远程修改都必须是可见的。

第二个条件说明,在更新一个共享变量前,进程必须以互斥方式进入临界区,以确定没有其他进程同时更新它。

第三个条件说明,若进程试图以非互斥方式进入临界区,它必须与保护此临界区的同步变量的拥有者核查,以获得被保护共享变量的最新拷贝。

最后,附一张入口一致性的示意图:



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

  1. 2019年1月9日07:53 | #1

    I wanted to post you a tiny note to give many thanks yet again for those pleasant knowledge you’ve shared on this site. This has been simply incredibly open-handed with you to grant without restraint what a number of us might have advertised as an ebook to end up making some money for themselves, precisely given that you might well have tried it if you considered necessary. The good ideas also worked to be a great way to understand that many people have the identical interest similar to my own to realize lots more with regards to this problem. I am sure there are thousands of more fun moments up front for individuals who check out your site.

  2. 2019年1月9日11:47 | #2

    I happen to be writing to make you be aware of what a brilliant encounter our daughter had studying your webblog. She came to find a wide variety of pieces, including how it is like to possess a great teaching heart to get other individuals with ease learn about a number of complicated matters. You truly exceeded our expected results. Many thanks for displaying such helpful, healthy, informative not to mention fun thoughts on your topic to Janet.

  3. 2019年1月10日08:38 | #3

    Thank you for all your valuable hard work on this web site. Kate takes pleasure in setting aside time for investigation and it’s easy to see why. A number of us know all about the compelling form you give great ideas on the website and even encourage participation from visitors on that point while our favorite child has been being taught a lot of things. Enjoy the remaining portion of the new year. You are always carrying out a terrific job.

  4. 2019年1月11日04:44 | #4

    I wanted to write you the very small remark to finally give many thanks the moment again for all the pleasing tactics you’ve documented at this time. It has been quite incredibly generous of people like you in giving easily all that a lot of people would have supplied as an e book to help with making some bucks for their own end, primarily seeing that you could have tried it if you ever wanted. These ideas likewise worked to provide a good way to be sure that other individuals have similar zeal really like mine to find out much more when considering this problem. I think there are some more enjoyable instances up front for people who browse through your blog.

  5. 2019年1月12日00:15 | #5

    I simply had to thank you very much once more. I’m not certain the things that I would’ve undertaken without these creative concepts documented by you relating to that question. It was the distressing circumstance in my opinion, however , encountering this expert strategy you dealt with the issue took me to weep with fulfillment. I am just thankful for the guidance and as well , trust you comprehend what a powerful job that you’re carrying out educating the others by way of your website. I’m certain you have never encountered any of us.

  6. 2019年1月12日03:21 | #6

    I precisely had to appreciate you again. I’m not certain the things that I could possibly have taken care of without those methods shown by you concerning such a question. It became the troublesome dilemma in my circumstances, nevertheless coming across the very skilled strategy you processed it made me to cry with delight. I will be thankful for your help and in addition wish you comprehend what a powerful job that you are carrying out teaching many others by way of your website. I am sure you haven’t come across any of us.

  7. 2019年1月12日16:24 | #7

    I would like to show my gratitude for your kind-heartedness in support of people that need guidance on this area of interest. Your real dedication to getting the message all around came to be exceptionally powerful and have frequently allowed individuals like me to arrive at their targets. This informative suggestions can mean a great deal to me and extremely more to my colleagues. Thank you; from all of us.

  8. 2019年1月13日11:34 | #8

    I wish to express thanks to this writer just for bailing me out of this particular problem. Because of browsing throughout the the net and coming across methods that were not beneficial, I thought my entire life was over. Being alive devoid of the approaches to the difficulties you’ve fixed by means of the site is a critical case, as well as the kind that would have adversely affected my entire career if I had not come across your blog post. Your personal expertise and kindness in taking care of every part was excellent. I am not sure what I would have done if I hadn’t come across such a subject like this. It’s possible to at this moment relish my future. Thanks for your time so much for your impressive and sensible guide. I will not be reluctant to suggest the sites to any person who will need assistance about this subject.

  9. 2019年1月14日07:04 | #9

    I needed to draft you this very small observation to give many thanks again on the pleasant tactics you have contributed on this site. It was wonderfully open-handed of you to convey without restraint precisely what most people would’ve marketed for an e-book to get some cash for themselves, certainly considering the fact that you could possibly have done it in the event you considered necessary. Those advice in addition acted to be a great way to recognize that other individuals have a similar keenness much like my own to know a lot more on the subject of this condition. I think there are several more pleasant moments in the future for folks who view your site.

  10. 2019年1月28日05:28 | #10

    I simply wanted to type a comment so as to say thanks to you for all of the magnificent hints you are giving out at this website. My long internet look up has now been rewarded with good content to share with my family members. I ‘d assume that we visitors actually are really endowed to live in a notable site with so many brilliant individuals with great opinions. I feel somewhat lucky to have encountered the weblog and look forward to so many more enjoyable minutes reading here. Thanks once more for a lot of things.

  11. 2019年1月28日19:02 | #11

    I am commenting to make you understand of the fine experience my cousin’s princess had going through the blog. She figured out numerous issues, not to mention what it is like to possess a wonderful giving style to have many others easily have an understanding of certain very confusing subject matter. You undoubtedly surpassed our own expectations. Many thanks for coming up with those powerful, trusted, educational and also cool thoughts on that topic to Janet.

  12. 2019年1月29日08:36 | #12

    I in addition to my guys have been checking the good tips and tricks on your web page then before long I got an awful feeling I never thanked you for those techniques. All the people ended up as a result passionate to read through all of them and have now undoubtedly been tapping into these things. Thanks for genuinely simply kind and then for getting such incredible information millions of individuals are really desirous to discover. My honest regret for not saying thanks to you sooner.

  13. 2019年1月29日23:10 | #13

    Thank you a lot for providing individuals with an exceptionally splendid opportunity to discover important secrets from this web site. It can be so terrific and as well , jam-packed with a lot of fun for me and my office peers to visit your site no less than three times every week to read through the new tips you have. And indeed, I am at all times impressed with all the perfect solutions served by you. Some 2 tips in this posting are clearly the finest I have had.

  14. 2019年1月30日09:39 | #14

    Thank you for your own efforts on this web page. My niece loves setting aside time for investigations and it is simple to grasp why. My spouse and i notice all regarding the dynamic means you give great guidelines via this website and even boost response from other individuals on the area while my daughter is truly being taught a great deal. Take pleasure in the remaining portion of the year. You are always performing a remarkable job.

  15. 2019年1月31日00:56 | #15

    I precisely wished to thank you so much once more. I do not know what I could possibly have done without the type of secrets documented by you on this subject matter. It had been the difficult circumstance for me, but spending time with a specialized fashion you handled that took me to weep over gladness. Now i’m happy for your information and even wish you really know what an amazing job you are always providing training many others using your webblog. Most likely you haven’t met all of us.

  16. 2019年1月31日11:07 | #16

    Thanks so much for giving everyone an extraordinarily spectacular opportunity to discover important secrets from this web site. It is usually so lovely and jam-packed with fun for me personally and my office colleagues to search your website at least thrice in a week to find out the latest guides you have. And definitely, I am usually contented for the magnificent tips you give. Certain two tips in this post are clearly the most beneficial I’ve ever had.

  17. 2019年2月1日01:52 | #17

    I and also my friends came following the best hints found on your web blog then then came up with an awful suspicion I never thanked the web blog owner for those techniques. Those ladies were definitely as a result very interested to study them and have sincerely been having fun with those things. Thanks for indeed being simply helpful as well as for settling on varieties of exceptional useful guides millions of individuals are really needing to understand about. Our sincere regret for not expressing gratitude to sooner.

  18. 2019年2月1日11:45 | #18

    I am also writing to let you be aware of of the fantastic experience our child found reading through your webblog. She discovered some things, which included what it is like to possess a great coaching nature to get the mediocre ones just fully grasp various problematic topics. You really did more than our own desires. Many thanks for rendering such priceless, dependable, informative not to mention unique tips about this topic to Emily.

  19. 2019年2月2日01:29 | #19

    Thank you for your own work on this blog. My mother really loves conducting investigation and it is obvious why. A lot of people learn all of the dynamic tactic you produce sensible steps via this blog and as well as foster response from some others about this theme plus our own child is certainly starting to learn a lot of things. Enjoy the rest of the year. You are always carrying out a really great job.

  20. 2019年2月2日12:19 | #20

    I wish to get across my passion for your kind-heartedness giving support to visitors who have the need for guidance on this one question. Your personal commitment to passing the solution around turned out to be exceedingly powerful and have truly allowed those much like me to achieve their targets. Your own invaluable recommendations implies a lot a person like me and substantially more to my office workers. Thanks a lot; from each one of us.

  21. 2019年2月3日02:39 | #21

    Thanks for all of the work on this web site. Betty enjoys getting into research and it’s really easy to understand why. We notice all relating to the dynamic tactic you create effective secrets by means of your website and as well increase participation from some others on the point plus my child is in fact discovering so much. Enjoy the remaining portion of the year. You are conducting a good job.

  22. 2019年2月3日12:38 | #22

    I have to express my thanks to the writer just for rescuing me from this type of difficulty. Just after researching through the internet and seeing things which are not powerful, I was thinking my entire life was done. Being alive without the approaches to the problems you have sorted out by means of your main report is a critical case, and the kind that might have in a wrong way affected my career if I had not discovered the website. Your personal knowledge and kindness in taking care of the whole lot was invaluable. I’m not sure what I would’ve done if I hadn’t encountered such a stuff like this. I can also now look forward to my future. Thanks a lot so much for this expert and sensible guide. I will not hesitate to propose your site to any individual who should have guidelines about this area.

  23. 2019年2月4日01:22 | #23

    Needed to compose you a bit of word just to say thank you over again with your beautiful opinions you’ve shown above. This is so shockingly generous with you to convey openly precisely what many people would’ve marketed for an e-book in order to make some dough for themselves, certainly given that you might have done it in the event you decided. These techniques additionally acted to be the great way to know that many people have similar eagerness like my very own to learn a great deal more when considering this issue. I am certain there are numerous more pleasant periods in the future for people who see your site.

  24. 2019年2月4日23:52 | #24

    I’m commenting to make you understand what a perfect encounter my princess experienced visiting your site. She even learned a lot of issues, most notably how it is like to have a wonderful giving spirit to let most people really easily understand several impossible matters. You actually surpassed people’s desires. I appreciate you for delivering such great, trusted, edifying and in addition fun tips on this topic to Lizeth.

  25. 2019年2月5日20:37 | #25

    Thanks a lot for giving everyone an extraordinarily pleasant opportunity to read articles and blog posts from this web site. It can be so ideal and jam-packed with a great time for me and my office co-workers to search your blog really three times in one week to learn the latest things you will have. And lastly, we are certainly amazed with the gorgeous tips and hints served by you. Certain 3 ideas on this page are in truth the most effective I have ever had.

  26. 2019年2月6日06:56 | #26

    I and my guys were actually going through the nice information and facts from your web site while before long came up with a terrible suspicion I never expressed respect to you for those tips. All of the women became passionate to learn all of them and have in reality been taking pleasure in those things. Many thanks for getting really thoughtful and then for deciding on this sort of great topics millions of individuals are really desperate to be informed on. Our own honest regret for not expressing appreciation to earlier.

  27. 2019年2月6日18:09 | #27

    Thanks so much for giving everyone remarkably breathtaking possiblity to read from here. It can be very excellent and jam-packed with amusement for me and my office mates to search your blog at a minimum three times every week to read through the newest guides you will have. And of course, I am actually amazed with all the perfect suggestions served by you. Some 1 tips in this posting are surely the most effective we’ve had.

  28. 2019年2月7日05:35 | #28

    I simply wanted to write a brief remark to be able to say thanks to you for some of the fantastic ideas you are giving on this website. My time-consuming internet look up has at the end been paid with brilliant content to exchange with my colleagues. I ‘d suppose that we readers actually are rather fortunate to be in a great community with many perfect individuals with useful plans. I feel quite grateful to have used your web page and look forward to many more fabulous moments reading here. Thanks once more for all the details.

  29. 2019年2月7日15:32 | #29

    I’m just commenting to let you know what a incredible experience my wife’s child enjoyed reading your web page. She realized some details, which included what it’s like to have a wonderful teaching mood to have other individuals completely know precisely certain complicated matters. You truly did more than her desires. I appreciate you for coming up with the essential, trusted, edifying as well as easy tips about this topic to Tanya.

  30. 2019年2月7日19:55 | #30

    I just want to tell you that I am newbie to blogs and honestly loved your web blog. Very likely I’m want to bookmark your blog . You amazingly have outstanding article content. Kudos for sharing your web site.

  31. 2019年2月8日05:20 | #31

    I and my pals came reading the best key points found on the website while at once I got a horrible feeling I had not expressed respect to the web site owner for those techniques. The people came warmed to study them and already have sincerely been enjoying these things. Thank you for really being indeed helpful and for opting for such smart topics most people are really needing to learn about. My honest regret for not expressing gratitude to you sooner.

  32. 2019年2月9日05:19 | #32

    Thanks so much for providing individuals with remarkably pleasant chance to check tips from here. It’s always very pleasing and as well , full of fun for me and my office mates to visit your blog minimum 3 times in 7 days to learn the fresh stuff you will have. And definitely, I am just always pleased with all the wonderful suggestions you serve. Selected 4 tips on this page are indeed the most efficient we have all had.

  33. 2019年2月9日15:20 | #33

    Thank you so much for providing individuals with an extremely memorable possiblity to read articles and blog posts from here. It’s always very ideal and as well , packed with fun for me and my office fellow workers to visit your site really thrice a week to read through the fresh tips you have. And of course, I am also usually impressed concerning the astonishing tricks served by you. Selected 1 tips in this post are easily the simplest I’ve had.

  34. 2019年2月10日04:22 | #34

    I have to express thanks to the writer for bailing me out of this type of difficulty. After checking through the the net and getting methods that were not pleasant, I believed my life was well over. Being alive devoid of the solutions to the issues you have fixed by way of this report is a crucial case, as well as the ones which may have in a negative way damaged my career if I hadn’t discovered your web blog. Your personal know-how and kindness in touching every aspect was very useful. I’m not sure what I would’ve done if I hadn’t encountered such a solution like this. I’m able to now look forward to my future. Thanks very much for the high quality and sensible guide. I won’t hesitate to suggest the blog to anyone who should get direction about this situation.

  35. 2019年2月10日16:25 | #35

    Thanks so much for providing individuals with a very superb possiblity to read from this blog. It really is very terrific plus full of a good time for me and my office acquaintances to visit the blog at minimum three times a week to study the fresh guides you will have. And indeed, I am also always motivated for the dazzling hints served by you. Certain two ideas in this posting are in truth the most beneficial I have had.

  36. 2019年2月11日03:18 | #36

    Instead, you had been getting coverage from the major health carrier that the broker did business with.
    If you pay your whole premium in full, it is possible to ask for a discount from your insurer.

    Landlord’s security coverage materials safety for losses arising from theft,
    damage for your house introduced about by tenants.

  37. 2019年2月11日05:33 | #37

    I definitely wanted to type a simple note to be able to say thanks to you for all of the magnificent advice you are writing on this site. My considerable internet investigation has now been recognized with reputable suggestions to talk about with my relatives. I ‘d declare that we visitors actually are extremely blessed to exist in a good website with so many awesome individuals with valuable tactics. I feel extremely happy to have used your site and look forward to so many more brilliant times reading here. Thanks a lot again for everything.

  38. 2019年2月11日12:03 | #38

    I would really like you to become a guest poster on my blog.*`”-,

  39. 2019年2月11日18:37 | #39

    Thanks so much for providing individuals with a very terrific chance to read critical reviews from this web site. It’s always so good plus packed with a great time for me and my office peers to search your site nearly three times in a week to learn the new guidance you will have. Of course, I’m always satisfied for the surprising ideas you give. Certain 3 ideas on this page are really the very best we have ever had.

  40. 2019年2月16日12:00 | #40

    I believe one of your adverts caused my web browser to resize, you may well want to put that on your blacklist.

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

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