Software Concepts in Distributed Systems

The software is more crucial than the hardware, despite it being equally necessary. The operating system software, not the hardware, significantly determines the perception that a system's users have of it and how they perceive it. In this section, we will introduce the various types of operating systems for multiprocessors and multicomputer.

Operating systems cannot be put into nice, well-ordered compartments like hardware. By nature, software is unclear and unstructured. However, two types of operating systems for systems with several CPUs may roughly be distinguished: closely connected and loosely coupled. Loosely and tightly-coupled software is roughly corresponding to loosely and tightly-coupled hardware respectively.

A distributed system's computers and users can be fundamentally independent of one another while nevertheless interacting with one another to a limited extent as necessary thanks to loosely coupled software.

• Consider a group of personal computers that each have their own CPU, memory, hard drive, and operating system, but that share some resources, like laser printers and databases, across a local area network (LAN). Since each machine in this system can be easily distinguished from the others and performs a specific task, it is said to be loosely connected. The individual workstations can still function to a significant extent even if the network were to crash for any reason, however, some functionality would be lost (e.g., the ability to print files).

• a multiprocessor with the sole purpose of concurrently executing one chess software. Each CPU is given a board to assess, and it spends its time scrutinising both that board and any possible derivative boards. The CPU is given a fresh board to work on after reporting the findings of the examination. This system's software, both the application programme and the supporting operating system, are obviously much more closely related than in our prior example.

We'll take a look at some of the most typical hardware and software pairings in the sections that follow.

Network Operating Systems

We'll start with loosely linked hardware and software as this is arguably the most typical setup in most businesses.

A network of workstations connected by a LAN serves as a common illustration. Each user in this paradigm has a workstation that is only used by him. A hard drive might or might not be present. Its operating system is unique. Normally, all instructions are executed locally, on the workstation.

However, there are situations when a person may remotely connect to another computer by executing a programme like

login machine

This command converts the user's desktop into a remote terminal that is logged into the distant system. The remote machine receives commands input on the keyboard, and the screen displays output from the distant machine. It is important to log out before using the rlogin command to connect to a separate remote system in order to transition between them. Only one machine may be in operation at any given time, and choosing that machine is purely manual.

Workstation networks frequently offer a remote copy function that may transfer files from one computer to another. For example, a command like

rcp machine1:file1 machine2:file2

may transfer the file file1 from computer 1 to machine 2, where it will be given the name file2. Once more, the user must be fully aware of the locations of all files and the locations where all instructions are being run because the transfer of files is explicit in this case.

This form of communication is extremely primitive and has directed system designers to search for more convenient forms of communication and information sharing. A shared, universal file system that is accessible from all workstations is one strategy. One or more devices referred to as file servers provide support for the file system. Clients, or user applications operating on other (nonserver) machines, submit requests to the file servers to read and write files. Every request received is evaluated, processed, and the response is delivered back.

 

True Distributed Operating Systems


On loosely connected hardware, network operating systems are loosely coupled software. Users are well aware that such a system comprises of several computers, aside from the shared file system. Each one can be used anyway its owner pleases and run its own operating system. With the exception of the need that client-server traffic go by the system's protocols, there is basically no coordination at all.

The next is tightly coupled software on the same loosely-coupled (i.e., multicomputer) hardware. Such a system aims to instil in users' brains the idea that the entire computer network functions as a single timesharing system rather than a collection of individual PCs.

it is slightly different, saying that a distributed system is one that runs on a collection of networked machines but acts like a virtual uniprocessor.

Users shouldn't need to be aware that the system contains many CPUs. There are a few potential candidates on the horizon, but no system in use now completely satisfies this need.

characteristics of a distributed system:

  • There must be a single, global inter-process communication mechanism so that any process can talk to any other process. Diverse mechanisms on several machines, or different methods for local and remote communication, are unacceptable.

  • There must also be a global protection scheme.

• Additionally, process management must be uniform throughout.. Diverse mechanisms on several machines, or different methods for local and remote communication, are unacceptable.

In other words, the premise of network operating systems, that any machine can behave anyway it pleases when communicating with clients and servers, is insufficient. All computers must support the same set of system calls, and these calls must be created in a way that makes sense in a distributed environment.

Additionally, the file system must appear uniformly throughout. Additionally, every file should be accessible everywhere, naturally subject to protection and security restrictions.

It is expected that identical kernels operate on all of the system's CPUs because every CPU uses the same system call interface. This makes it simpler to coordinate necessary actions.

For instance, all the kernels must work together to determine the optimum location to carry out a task when it needs to be launched. A global file system is also required.

Each kernel can have a lot of control over the resources it uses locally. For instance, it makes sense to let each kernel manage its own memory as there isn't shared memory.

There is currently a sizable corpus of information concerning developing and putting distributed operating systems into practice.

Multiprocessor Timesharing Systems

The next combination we'd want to talk about is tightly connected hardware and software.

There are a variety of special-purpose machines in this category (such as dedicated database machines), but multiprocessors that run like UNIX timesharing systems but with numerous CPUs rather than one CPU are the most prevalent general-purpose examples.

A multiprocessor with 32 30-MIPS CPUs appears to the outside world to be a single 960-MIPS CPU (this is the single-system image discussed above).

Except that because the entire design can be centralised, implementing it on a multiprocessor makes things considerably simpler.

The presence of a single-run queue is this system class's distinguishing feature:

  • a list of all the system's processes that have been conceptually unblocked and are available for execution.

  • In the shared memory is a data structure known as the run queue.

  • Consider the system, for instance, which has three CPUs and five ready-to-run processes. Three of the five processes—process A on CPU 1, process on CPU 2, and process C on CPU 3—are now running, and all five are present in shared memory. D and E, the remaining two processes, are waiting for their turn in memory as well.

     

Presently guess that cycle В blocks sitting tight for I/O or its quantum runs out. One way or the other, CPU 2 should suspend it, and track down one more cycle to run. Computer chip 2 will regularly start executing working framework code (situated in the common memory). All subsequent to having saved B's registers, it will enter a basic district to run the scheduler to search for one more interaction to run. It is fundamental that the scheduler be run as a basic locale to keep two CPUs from picking a similar cycle to run straightaway. The fundamental shared avoidance can be accomplished by utilizing screens, semaphores, or some other standard development utilized in single-processor frameworks.

When CPU 2 has acquired elite admittance to the run line, it can eliminate the primary passage, D, exit from the basic area, and start executing D. At first, execution will be delayed since CPU 2's store is loaded with words having a place with that piece of the common

memory containing process B, yet after a short time, these will have been cleansed and the reserve will be loaded with D's code and information, so execution will accelerate.

Since none of the CPUs have nearby memory and all projects are put away in the worldwide common memory, it doesn't make any difference on which CPU a cycle runs. By and large, it will spend about a similar measure of time running on every CPU.

On the off chance that all CPUs are inactive, hanging tight for I/O, and one cycle becomes prepared, it is marginally desirable to distribute it to the CPU it was last utilizing, accepting that no other interaction has utilized that CPU since

in the event that a cycle blocks for I/O on a multiprocessor, the working framework has the decision of suspending it or simply allowing it to do in the middle of delaying. On the off chance that most I/O is finished quicker than it takes to do a cycle switch, in the middle of delaying is best. A few frameworks let the cycle save its processor for a couple of milliseconds, with the expectation that the I/O will finish soon, however on the off chance that that doesn't happen before the clock runs out, an interaction switch is made. Assuming that most basic locales are short, this approach can stay away from numerous costly interaction switches.

An area in which this kind of multiprocessor differs appreciably from a network or distributed system is in the organization of the file system.

  • The operating system normally contains a traditional file system, including a single, unified block cache.

  • When any process executes a system call, a trap is made to the operating system, which carries it out, using semaphores, monitors, or something equivalent, to lock out other CPUs while critical sections are being executed or central tables are being accessed.

  • In this way, when a WRITE system call is done, the central block cache is locked, the new data entered into the cache, and the lock released.

  • Any subsequent READ call will see the new data, just as on a single-processor system.

  • The file system is essentially identical to a single-processor file system overall. On some multiprocessors, the operating system is really run on one of the CPUs, while user programmes are run on the other ones. Nevertheless, because the operating system computer is frequently a bottleneck, this arrangement is undesirable. Boykin and Langerman go into length on this issue (1990).

It should be obvious that machines without shared memory cannot employ the techniques used on the multiprocessor to create the appearance of a virtual uniprocessor. Block-only caches and centralised run queues function when all CPUs can access them with little to no delay. Although a network of machines could imitate these data structures, the connection costs make this method unaffordable.