GPS satellite clock server uses detailed

GPS satellite clock server uses detailed
as distributed systems using distributed algorithms, so it's synchronization mechanism is more complex than a centralized system. In a centralized system can do, at a certain position can be set to receive all of the information systems, the information is then detected by a certain process, and then make synchronization decisions, but this is often not possible in a distributed system do. Distributed algorithms generally have the following characteristics:
1) information distributed across multiple machines.
2) processes only make decisions based on locally available information.
3) single failure in the system should be avoided.
4) there is no common clock or other precise global time source.
Three are said in front of a single point in the process you can not collect all information systems. For example, when doing resource allocation (in the manner of dispensing will not deadlock I / O devices), typically not all the IO requests to a management process. Check all management process I / O requests, according to which the device decision information satisfies the request or reject the request table. In a large system, all the requests sent to a single management process, this process would burden too heavy. And like this single failure would make the whole system becomes unreliable. Ideally, the distributed system should be more reliable than the single. If a machine stops working in a distributed system, the rest of the machine should be able to continue to complete the system functions. Most do not want to see that, due to a machine failure (such as resource allocator) lead to many other machines (such as its customers) to terminate the work. To achieve synchronization in the absence of centralized control, it needs to be taken with the traditional operating system in different ways.
  The first four points listed above are also important. In a centralized system, the time is very clear. Each process is to know the current time, as long as the implementation of a system call, the operating system kernel will return the current system time to the process. If process A query system time later process B also to query the system time, then the process B will get time (may be equal) A time course after the value obtained, certainly not before that. Distributed systems, to achieve consistency this time is not a simple matter.
As a simple example, consider the lack of a consistent global significance of time in UNIX make programs. In UNIX, Large programs can usually be divided into multiple source files, so when you modify a file as long as it compiled a file, rather than compiling all the documents. If the program has one hundred files, it does not need because there is a file undergone major changes and recompile all files, thus greatly accelerating the speed of programmers work.
  In general, the way to make the program work is very simple. After the programmer modify the source file, start nla ~ e. Make checks last modified source file and its corresponding object file. If the source file input. C last modified time is 2151, and the respective target drive minput. o last modified time is 2150, make the program can determine input in the creation. After o, modifying the source file input. C, so to recompile the source file input. C. Conversely, if the output. c the last modified time is 2144, and the last change time output, o is 2145, there is no need to recompile Output, the c. Make the program through all the source files to find
out the need to recompile the file, call the compiler to compile the files.
Now, imagine that in the absence of a global - make program execution time caused by a distributed system. Assumptions ouput. o last modified or 2144, then modify the source file output. c, but due to editing output. c machine slow clock, it is modified output. c is designated as a final period of 2143, shown in Figure 11-1. Then, make the program would not have to recompile output.c result, the resulting executable file including the target object files generated by old and new source files source files generated. In this way, the program will run problem, while the programmer to find the source of the problem in the code, but also a big headache thing.
  Above we see, time is the basis for people to consider the issue, it will not produce dramatic results synchronization between clock. Therefore, "all clock distribution system may synchronize it?" Such a simple question began to study the synchronization is more appropriate.

Published 42 original articles · won praise 3 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_44990608/article/details/103988434