Various optimizations are possible. For example, instead of synchronizingafter an operation, it couldbe done when an operation is started, as in entry consistency or lazy release consistency. The advantagehere is that if a process executes an operation on a shared object repeatedly (e.g., in a loop), nobroadcasts at all are sent until some other process exhibits interest in the object.Another optimization is not to suspend the caller while doing the broadcast after a write that does notreturn a value (e.g.,push in our stack example). Of course, this optimization must be done in such atransparent way. Information supplied by the compiler makes other optimizations possible.In summary, the Orca model of distributed shared memory integrates good software engineeringpractice (encapsulated objects), shared data, simple semantics, and synchronization in a natural way.Also, in many cases an implementation as efficient as release consistency is possible. It works best whenthe underlying hardware and operating system must provide efficient, reliable, totally-orderedbroadcasting, and the application must has an inherently high ratio of reads to writes for accesses toshared objects.6.7. COMPARISONLet us now briefly compare the various systems we have examined. IVY just tries to mimic amultiprocessor by doing paging over the network instead of to a disk. It offers a familiar memorymodel—sequential consistency, and can run existing multiprocessor programs without modification.The only problem is the performance.Munin and Midway try to improve the performance by requiring the programmer to mark thosevariables that are shared and by using weaker consistency models. Munin is based on releaseconsistency, and on every release transmits all modified pages (as deltas) to other processes sharingthose pages. Midway, in contrast, does communication only when a lock changes ownership.Midway supports only one kind of shared data variable, whereas Munin has four kinds (read only,migratory, write-shared, and conventional). On the other hand, Midway supports three differentconsistency protocols (entry, release, and processor), whereas Munin only supports release consistency.Whether it is better to have multiple types of shared data or multiple protocols is open to discussion.More research will be needed before we understand this subject fully.Finally, the way writes to shared variables are detected is different. Munin uses the MMU hardware totrap writes, whereas Midway offers a choice between a special compiler that records writes and doing itthe way Munin does, with the MMU. Not having to take a stream of page faults, especially inside criticalregions, is definitely an advantage for Midway.Now let us compare Munin and Midway to object-based shared memory of the Linda-Orca variety.