As an aside, some authors make a distinction betweendistributed systems, which are designed to allow many users to work together, andparallel systems, whose only goal is to achieve maximum speedup on a single problem, as our 500,000-MIPS machine might. We believe that this distinction is difficult to maintain because the design spectrum is really a continuum. We prefer to use the term “distributed system” in the broadest sense to denote any system in which multiple interconnected CPUs work together.. It should be clear that the methods used on the multiprocessor to achieve the appearance of a virtual uniprocessor are not applicable to machines that do not have shared memory. Centralized run queues and block only caches work when all CPUs have access to them with very low delay. Although these data structures could be simulated on a network of machines, the communication costs make this approach prohibitively expensive.. char data[BUF_SIZE]; /* data to be read or written */. Let us first take a look atheader.h. It starts out by defining two constants,MAX_PATH andBUF_SIZE, that determine the size of two arrays needed in the message. The former tells how many characters a file name (i.e., a path name like /usr/ast/books/opsys/chapter1.t) may contain. The latter fixes the amount of data that may be read or written in one operation by setting the buffer size. The next constant,FILE_SERVER, provides the network address of the file server so that clients can send messages to it.. A considerable performance gain can be achieved bycaching(i.e., holding) the most recently used files in the server’s main memory. a client reading a file that happens to be in the server’s cache eliminates the disk transfer, although the network transfer still has to be done. Since main memory is invariably smaller than the disk, some algorithm is needed to determine which files or parts of files should be kept in the cache.. One particularly simple and common protocol is calledwrite through.When a CPU first reads a word from memory, that word is fetched over the bus and is stored in the cache of the CPU making the request. If that word is needed again later, the CPU can take it from the cache without making a memory request, thus reducing bus traffic. These two cases, read miss (word not cached) and read hit (word cached) are shown in Fig. 6-3 as the
first two lines in the table. In simple systems, only the word requested is cached, but in most, a block of words of say, 16 or 32 words, is transferred and cached on the initial access and kept for possible future use.. return stack [top]; # return the top item. Fig. 6-41. A simplified stack object, with internal data and two operations.. Another optimization is not to suspend the caller while doing the broadcast after a write that does not return a value (e.g.,push in our stack example). Of course, this optimization must be done in such a transparent way. Information supplied by the compiler makes other optimizations possible.. A process can also unmap segments. Furthermore, a process can specify a range of virtual addresses and request that the range be unmapped, after which those addresses are no longer legal. When a segment or a range of addresses is unmapped, a capability is returned so the segment may still be accessed, or even mapped back in again later, possibly at a different virtual address.. The remaining fields are not specified by the RPC protocol, so a server and client can agree to use them any way they want. The normal conventions are as follows. Most requests to servers contain a capability, to specify the object being operated on. Many replies also have a capability as a return value. ThePrivate part is normally used to hold the rightmost three fields of the capability.. Fig. 7-14. (a) The sequencer crashes. (b) A coordinator is selected. (c) Recovery.. 8.4.3. The Network Message Server. 8. A small process has all its pages in memory. There is enough free memory available for ten more copies of the process. It forks off a child. Is it possible for the child to get a page or protection fault?. The unit of sharing between multiple machines is the segment. Segments are split up into fragments of one or more pages. At any instant, each fragment is either read-only, and potentially present on multiple machines, or read/write, and present only on one machine..