Chapter 10 Management of Network Functions PDF

Summary

This chapter discusses management of network functions, comparing network operating systems (NOS) and distributed operating systems (DOS). It explores how networking requirements influence operating systems and details the functions of NOS and DOS in managing memory, processes, devices, and files.

Full Transcript

Chapter 10 Management of Network Functions Single-User Operating Systems INTERACTION AMONG MANAGERS...

Chapter 10 Management of Network Functions Single-User Operating Systems INTERACTION AMONG MANAGERS Network Operating Systems Distributed Operating Systems “ As knowledge increases, wonder deepens. ” —Charles Morgan (1894–1958) Learning Objectives After completing this chapter, you should be able to describe: How networking requirements introduce complexities to operating systems How network operating systems (NOS) compare to distributed operating systems (DO/S) How a NOS performs memory, process, device, and file management How a DO/S performs memory, process, device, and file management Important features that differentiate between network and distributed operating systems Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 325 Chapter 10 | Management of Network Functions When organizations move toward completely decentralized systems, more and more computing devices are linked through complex networks of wireless communications, teleconferencing equipment, host computers, and other digital technologies. But there are two problems with this expansion. First, a tremendous demand is placed on data communication networks by the staggering number of hardware interconnections. Sec- ond, both the systems administrators and the user community place increasing pressure on these networks to operate with greater reliability, security, and speed. Comparison of Two Networking Systems In this chapter, we explore the differences between network operating systems and distributed operating systems. We explain process-based and object-based operating system models and use them to define the roles of the Memory, Processor, Device, File, and Network Managers as they pertain to both types of operating systems. The network operating system (NOS) evolved from the need to give users ready access 4 to resources that might be located far from the immediate surroundings of the computer A NOS relies on the node's or workstation. These operating systems centrally manage the network’s processes, and local managers make the network almost completely transparent for users and their sites’ operating to perform local systems. A typical NOS is illustrated in Figure 10.1. tasks. Requests for tasks to be A network operating system gives local operating systems extended powers. That is, it performed are passed from one gives the local system new abilities to accept a request to perform processing, or to node to another access data that’s not available locally. It starts by determining where the resources are node so that the located. Then it initiates the operation and returns the appropriate data or service to local host can fulfill the request. the requester. (figure 10.1) In a NOS environment, NOS each node, shown here as a circle, is managed by its own local oper- NOS ating system, shown node here as triangles. Their OS respective network operating systems, node shown as squares, OS NOS come into play only Request when one site’s system Reply needs to work with another site’s system. node OS Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 326 Comparison of Two Networking Systems It’s important that the NOS accomplish this transparently. The local operating system views the action as having been performed onsite. That’s because the network operat- ing system handles the interfacing details and coordinates the remote processing. It also coordinates communications among the local operating systems by tracking the status and location of all entities in the system. The local operating systems are traditional operating systems designed to run a single computer. This means they can perform a task only if the process is part of their envi- ronment; otherwise, they must pass the request on to the network operating system to run it. To a local operating system, it appears that the NOS is the server performing the task, whereas, in reality, the NOS is only the facilitator. The biggest limitation of a NOS is that it doesn’t take global control over memory management, process management, device management, or file management. Rather, it sees these tasks as autonomous local functions that must interact with each other. This limited view is problematic because an operating system can’t achieve true distributed computing or processing functions without global control of all assets, not only assets at the network communication level. This need for global control led to the development of the distributed operating system (DO/S). (Although they use a similar acronym, the DO/S described in this chapter must not be confused with the MS-DOS operating system that was widely used in the early days of home computers.) Distributed operating systems provide a unified environment designed to optimize oper- ations for the network as a whole, not just for local sites, as illustrated in Figure 10.2. (figure 10.2) In a DO/S environment, all DO/S nodes are part of a glob- node ally managed operating system designed to opti- Request node mize all system resources. Reply Requests between nodes node are handled entirely by the DO/S as well as every operation at every node. The major difference between a NOS and a DO/S is how each manages the local devices versus the network’s aggregate collection of resources. In other words, each local operat- ing system remains in charge of its local computer, and the collection of local operating systems are connected to each other to form a network. The NOS accesses resources by using local mechanisms, and each system is controlled and managed locally based on that system’s policy. Therefore, a system with seven computers and seven nodes would have seven operating systems abiding by seven sets of policies. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 327 Chapter 10 | Management of Network Functions On the other hand, the DO/S is more all encompassing, and considers system resources to be globally owned, and it manages them as such. It accesses resources using global mechanisms rather than local mechanisms, with system control and management based on a single system-wide policy. A comparison of the two types of network operating systems is shown in Table 10.1. (table 10.1) Network Operating System (NOS) Distributed Operating System (DO/S) Comparison of a NOS Local resources are owned by each local node. Resources are owned by a global operating and a DO/S—two types of system. operating systems used Local resources are managed by the local oper- Local resources are managed by a global to manage networked ating system. operating system. resources. Access is allowed in accordance with the policies Access is allowed in accordance with the of each local operating system. policy of the global operating system. Requests are passed from one local operating Requests are passed from one node to system to another via each node’s NOS. another node directly via a global operating system. For example, in a typical NOS environment, a user who wants to run a local process at a remote site must do the following: 1. Log on to the local network. 2. Instruct the local system to migrate the process or data to the remote site. 4 The NOS of the 3. Send a request to the remote site to schedule the process on its system. sending node must open Thereafter, the remote site views the process as a newly created process within its local communications operating system’s environment and manages it without outside intervention. If the pro- with the NOS of the targeted cess needs to be synchronized with processes at remote sites, the process needs to have network embedded calls to initiate action by the NOS. These calls are typically added on top of node before the local operating system to provide the communications link between the two processes communications can begin between on the different devices. This complicates the task of synchronization, which is the the two. responsibility of the user and is only partially supported by the operating system. On the other hand, a system managed by a DO/S handles this same example differently. If one site has a process that requires resources at another site, then the task is presented to the DO/S as just another process. The user acquires no additional responsibility. The DO/S examines the process control block to determine the specific requirements for this process. Then, using its process scheduler, the DO/S determines how to best execute the process based on the site’s current knowledge of the state of the total system. The process scheduler then takes this process, along with all other processes ready to run on the network, and calculates their order of execution on each node, while optimizing the global run time and maintaining process priorities. The emphasis is on maintaining the operating system’s global functionality, policies, and goals. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 328 NOS Development To centrally manage the network’s entire suite of resources, a DO/S is typically ­constructed with a replicated kernel operating system—low-level, hardware-control software (firmware) with system-level software for resource management. This soft- ware may be unique or duplicated throughout the system. Its purpose is to allocate and manage the system’s resources so that global system policies, not local policies, are maximized. The DO/S also has a layer that hides the network and its intricacies from users so that they can use the network as a single logical system and not as a collection of independent cooperating entities. NOS Development A NOS typically runs on a computer called a server, and the NOS performs services for network computers, called clients. Although computers can assume the role of clients most or all of the time, any given computer can assume the role of server (or client), depending on the requirements of the network. Client and server are not hardware- specific terms but are, instead, role-specific terms. Many network operating systems are true operating systems that include the four man- agement functions: memory management, process scheduling, file management, and device management (including disk and I/O operations). In addition, they have a net- work management function with a responsibility for network communications, pro- tocols, and so on. In a NOS, the network management functions come into play only when the system needs to use the network. At all other times, the Network Manager is dormant, and the operating system operates as if it’s a stand-alone system. Although a NOS can run applications as well as other operating systems, its focus is on sharing resources instead of running programs. For example, a single-user operating system, such as early versions of Windows, focuses on the user’s ability to run applica- tions. On the other hand, network operating systems focus on the user’s ability to share resources available on a server, including applications and data, as well as expensive shared resources. In the following pages we describe some of the features commonly found in a network operating system, without focusing on any one in particular. The best NOS choice depends on many factors, including the applications to be run on the server, the techni- cal support required, the user’s level of training, and the compatibility of the hardware with other networking systems. Important NOS Features Most network operating systems provide for standard local area network technolo- gies and client desktop operating systems. Most networks are heterogeneous; that is, they support computers running a wide variety of operating systems. A single network Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 329 Chapter 10 | Management of Network Functions might include devices running Windows, the Macintosh operating system (UNIX), and Linux. For a NOS to serve as the networking glue, it must provide strong support for every operating system in the larger information network, sustaining as many current standards as necessary. Therefore, it must have a robust architecture that adapts easily to new technologies. At a minimum, a NOS should preserve the user’s expectations for a desktop system. That means that the network’s resources should appear as simple extensions of that user’s existing system. For example, on a Windows computer, a network drive should appear as just another hard disk but with a different volume name and a different drive letter. On a Macintosh computer, the network drive should appear as an icon for a volume on the desktop. And on a Linux or UNIX system, the drive should appear as a mountable file system. A NOS is designed to operate a wide range of third-party software applications and hardware devices, including hard disk drives, optical disc drives, USB devices, and net- work interface cards. A NOS also supports software for multiuser network applications, such as electronic messaging, as well as networking expansions such as new protocol stacks. Finally, the NOS must blend efficiency with security. Its constant goal is to provide network clients with quick and easy access to the network’s data and resources without compromising network security. Major NOS Functions An important NOS function is to let users transfer files from one computer to another. In this case, each system controls and manages its own file system. For example, the Internet allows the use of the file transfer protocol (FTP). With FTP, students in a UNIX programming class can copy a data file from a campus computer to their laptops. To do this, each student begins by issuing something like the following command to create the FTP connection: ftp unixs.cis.pitt.edu This opens the FTP program, which then asks the student for a login name and pass- word. Once this information has been verified by the UNIX operating system, each student is granted permission to copy the file from the host computer. get filename.ext In this example, filename.ext is the absolute filename and extension of the required data file. That means the user must know exactly where the file is located—in which direc- tory and subdirectory the file is stored. This is because the file location isn’t necessarily transparent to the user. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 330 DO/S Development Tim Berners-Lee While working at CERN, the European Particle Physics Laboratory in Switzerland in 1989, Tim Berners-Lee invented what’s now known as the Web, which he termed “an internet-based hypermedia initiative for global information sharing.” He is Founder and Director of the World Wide Web Consortium (W3C), a Web standards organization founded in 1994 that develops interoperable technolo- gies (specifications, guidelines, software, and tools) to lead the Web to its full potential. He has received many international honors, including a MacArthur Fellowship (1998). He was named a Foreign Associate of the National Academy of Sciences (2009); and was knighted by H.M. Queen Elizabeth II in 2004 for services to the global development of the Internet. As of this writing, Berners-Lee is a professor at MIT and the University of Southampton, UK. In 2013, with Vinton Cerf, Robert Kahn, Louis Pouzin, and Marc Andreesen, Berners-Lee was awarded the Queen Elizabeth Prize for Engineering for “ground-breaking innovation in engineering that has been of global ­benefit to humanity.” Tony Scarpetta Courtesy of W3C This find-and-copy technique isn’t considered true file sharing, because all users wanting access to the data file must copy the file onto their own systems, thereby duplicating the code and wasting space. This practice also adds to version control difficulties, because when one user modifies the file in any way, these changes aren’t reflected on other copies already stored in other directories—unless each user explicitly replaces the old version with the new version. DO/S Development Because a DO/S manages the entire group of resources within the network in a global fashion, resources are allocated based on negotiation and compromise among equally important peer sites in the distributed system. One advantage of this type of system is its ability to support file copying, electronic mail, and remote printing, without requir- ing the user to install special server software on local machines. See Figure 10.3 for a Windows menu that allows the user to identify valid network connections. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 331 Chapter 10 | Management of Network Functions (figure 10.3) Using a Windows 10 oper- ating system, the user can personalize available net- work communications by using the Settings menu. Memory Management For each node, the Memory Manager uses a kernel with a paging algorithm to track the amount of memory that’s available. The algorithm is based on the goals of the local system, but the policies and mechanisms that are used at the local sites are driven by the requirements of the global system. To accommodate both local and global needs, mem- ory allocation and deallocation depend on scheduling and resource-sharing schemes that optimize the resources of the entire network. The Memory Manager for a network works the same way as it does for a stand-alone operating system, but it’s extended to accept requests for memory from both local and global sources. On a local level, the Memory Manager allocates pages based on the local policy. On a global level, it receives requests from the Process Manager to provide memory to new, or expanding, client or server processes. The Memory Manager also uses local resources to perform garbage collection in memory, perform compaction, decide which are the most and least active processes, and determine which processes to preempt to provide space for others. To control the demand, the Memory Manager handles requests from the Process ­Manager to allocate and deallocate space based on the network’s usage patterns. In a distributed environment, the combined memory for the entire network is made up of several subpools (one for each processor), and the Memory Manager has a subcompo- nent that exists on each processor. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 332 DO/S Development When an application tries to access a page that’s not in memory, a page fault occurs, and the Memory Manager automatically brings that page into memory. If the page is changed while in memory, the Memory Manager writes the changed page back to the file when it’s time to swap the page out of memory. Before allocating space, the Memory Manager examines the total free memory table. If the request can be filled, the memory is allocated and the table is modified to show the location of the allocated space. The Memory Manager also manages virtual memory. Specifically, it allocates and deal- locates virtual memory, reads and writes to virtual memory, swaps virtual pages to disk, gets information about virtual pages, locks virtual pages in memory, and protects the pages that need to be protected. Pages are protected using hardware or low-level memory management software in each site’s kernel. This protection is summoned as pages are loaded into memory. Several typical protection checks are performed on the pages, as shown in Table 10.2. (table 10.2) Type of Access Allowed Levels of Protection Granted Typical protection checks are performed on pages, Read and write Allows users to have full access to the page’s contents, giving them the ability to read and write. as they’re loaded into memory. The last three Read-only Allows users to read the page, but they’re not allowed to modify it. controls shown in this Execute-only Allows users to use the page, but they’re not allowed to read or modify table are needed to make it. This means that although a user’s process can’t read or write to sure processes don’t write the page, it can jump to an address within the page and start execut- to pages that should be ing. This is appropriate for shared application software, editors, and compilers. read-only. No access Prevents users from gaining access to the page. This is typically used by debugging or virus protection software to prevent a process from reading from or writing to a certain page. Process Management In a network, the Processor Manager provides the policies and mechanisms to create, delete, abort, name, rename, find, schedule, block, run, and synchronize processes; it also provides real-time priority execution if required. The Processor Manager also manages the states of execution: READY, RUNNING, and WAIT, as described in Chapter 4. To do this, each CPU in the network is required to have its own run-time kernel that manages the hardware—the lowest-level operation on the physical device, as shown in Figure 10.4. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 333 Chapter 10 | Management of Network Functions (figure 10.4) The kernel controls each piece of the host’s hard- Control of ware, including the CPU. operations Each kernel is operated by the DO/S, which, in turn, is directed by the applica- tion software running on Distributed the host computer. In this Host operating way, the most cumber- computer Applications system Kernel Hardware some functions are hidden from the user. Ease of use The kernel is the entity that controls and operates the CPU and manages the queues used for states of execution, although upper-level system policies direct how process control blocks (PCBs) are stored in the queues and how they’re selected to be run. Therefore, each kernel assumes the role of helping the system reach its operational goals. The kernel’s states are dependent on the global system’s process scheduler and dis- patcher, which organize the queues within the local CPU and choose the running policy, which is used to execute the processes on those queues. Typically, the system’s scheduling 4 function has three parts: a decision mode, a priority function, and an arbitration rule. One key to successful process The decision mode determines which policies are used when scheduling a resource. management in a DO/S environment Options could include preemptive, nonpreemptive, round robin, and so on. is rapid The priority function gives the scheduling algorithm the policy that’s used to assign communication among nodes. an order to processes in the execution cycle. This priority is often determined using a calculation that’s based on system characteristics, such as occurrence of events, task recurrence, system loading levels, or program run-time characteristics, such as most time remaining, least time remaining, and so on. The arbitration rule is a policy that’s used to resolve conflicts between jobs of equal priority. That is, it typically dictates the order in which jobs of the same priority are to be executed. Two examples of arbitration rules are last-in first-out (LIFO), and first-in first-out (FIFO). Most advances in job scheduling rely on one of three theories: queuing theory, statistical decision theory, or estimation theory. (These queuing and statistical decision theories are the same as those discussed in statistics courses.) An example of estimation theory is a scheduler based on process priorities and durations. It maximizes the system’s throughput by using durations to compute and schedule the optimal way to interleave process chunks. Distributed scheduling is better achieved when migration of the sched- uling function and policies considers all aspects of the system, including I/O, devices, processes, and communications. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 334 DO/S Development Processes are created, located, synchronized, and deleted using specific procedures. To create a process, the process manager (which is part of the Processor Manager) creates a kind of process control block (PCB) with information similar to the PCBs discussed in Chapter 4. This PCB has additional information identifying the process’s location in the network. To locate a process, the process manager uses a system directory or pro- cess that searches all kernel queue spaces—this requires system support for interprocess communications. To synchronize processes, the process manager uses message passing or remote procedure calls. To delete or terminate a process, the process manager finds the correct PCB and deletes it. There are two ways to design a distributed operating system. The first is a process-based DO/S, in which network resources are managed as a large heterogeneous collection. The second and more recent is an object-based DO/S, which clumps each type of hardware, along with its necessary operational software, into discrete objects that are manipulated as a unit. Of the two, a process-based DO/S most closely resembles the theory described in Chapter 4. Process-Based DO/S A process-based DO/S provides process management through the use of client/server processes that are synchronized and linked together through messages and ports (the ports are also known as channels or pipes). The major emphasis is on processes and messages, and how they provide the basic features essential to process management, such as process creation, scheduling, pausing, communication, and identification, to name a few. The issue of how to provide these features can be addressed in several ways. The pro- cesses can be managed from a single copy of the operating system, from multiple coop- erating peers, or from some combination of the two. Operating systems for distributed computers are typically configured as a kernel on each site. All other services that are dependent on particular devices are typically found on the sites where the devices are located. As users enter the system, the scheduling manager gives them a unique process identifier and then assigns them to a site for processing. In a distributed system, there is a high level of cooperation and sharing among the sites when determining which process should be loaded and where it should be run. This is done by exchanging messages among site operating systems. Once a process is scheduled for service, it must be initiated at the assigned site by a dispatcher. The dispatcher takes directions from the operating system’s scheduler, allocates the device to the process, and initiates its execution. This procedure may necessitate one of the following: mov- ing a process from memory in one site to memory at another site; reorganizing a site’s memory allocation; reorganizing a site’s READY, RUNNING, and WAIT queues; and initiating the scheduled process. The Processor Manager recognizes only processes and their demands for service. It responds to them based on the established scheduling Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 335 Chapter 10 | Management of Network Functions policy, which determines what must be done to manage the processes. As mentioned in earlier chapters, policies for scheduling must consider issues such as load balanc- ing, overhead minimization, memory loading minimization, first-come first-served, and least-time-remaining. Synchronization is a key issue in network process management. For example, processes can coordinate their activities by passing messages to each other. In addition, to carry out the proper logistics for synchronizing actions within a process, processes can use primitives to pass synchronization parameters from one port to another. Primitives are well-defined, low-level operating system mechanisms, such as “send and receive.” For instance, when a process reaches a point at which it needs service from an external source, such as an I/O request, it sends a message searching for the service. While it waits for a response, the processor server puts the process in a WAIT state. Interrupts, which cause a processor to be assigned to another process, are also repre- sented as messages that are sent to the proper process for service. For example, an inter- rupt may cause the active process to be blocked and moved into a WAIT state. Later, when the cause for the interruption ends, the processor server unblocks the interrupted process and restores it to a READY state. Object-Based DO/S An object-based DO/S has a different way of looking at the computer system than a process-based DO/S. Instead of viewing the system as a collection of individual resources and processes, the system is viewed as a collection of objects. An object can represent a piece of hardware (such as a CPU or memory), software (such as files, programs, sema- phores, and data), or a combination of the two (printers, scanners, and USB ports — each bundled with the software required to operate it). Each object in the system has a unique identifier to differentiate it from all other objects in the system. Objects are viewed by the operating system as abstract entities—data types that can go through a change of state, act according to set patterns, be manipulated, or exist in relation to other objects in a manner appropriate to the object’s semantics in the system. This means that objects have a set of unchanging properties that defines them and their behavior within the context of their defined parameters. For example, a writ- able CD (CD-R) drive has unchanging properties that include the following: Data can be written to a disc, data can be read from a disc, reading and writing can’t take place concurrently, and the data’s beginning and ending points can’t be compromised. If we use these simple rules to construct a simulation of a CD-R drive, we have created an accurate representation of this object. To determine an object’s state, one must perform an appropriate (allowed) operation on it, such as reading or writing to a hard disk, because the object is identified by the set of operations one can send it. Typically, systems using this concept have a large number of Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 336 DO/S Development objects but a small number of operations for the objects. For example, a printer might have three operations: one to advance a full page, one to advance one line, and one to advance one character. Therefore, in an object-based DO/S, process management becomes object manage- ment, with processes acting as discrete objects. Process management, in this case, deals with the policies and mechanisms for controlling the operations, and the creation and destruction of objects. Therefore, process management has two components: the kernel level and the process manager. Kernel Level The kernel level, illustrated in Figure 10.5, provides the basic mechanisms for build- ing the operating system by creating, managing, scheduling, synchronizing, and delet- ing objects; and it does so dynamically. For example, when an object is created, it’s assigned all the resources needed for its operation and is given control until the task is completed. Then the object returns control to the kernel, which selects the next object to be executed. The kernel also has ultimate responsibility for the network’s capability lists, as discussed in Chapter 8. Each site has both a capability manager that maintains the capability list for its objects, and a directory, which lists the location for all capabilities in the system. This directory guides local requests for capabilities to the sites on which they’re located. For example, if a process requests access to a region in memory, the capability manager first determines whether the requesting process has been previously granted rights. (figure 10.5) User In a Linux operating Request system, the kernel level is logically positioned Application between the computer hardware and the shell. User requests for hard- ware interaction move Linux Shell from the application to the shell, to the kernel, and then to the hardware ­control level. Linux Kernel Computer Hardware (disks, printers, monitors, projectors, connections, and more) Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 337 Chapter 10 | Management of Network Functions If so, then it can proceed. If not, it processes the request for access rights. When the requester has access rights, the capability manager grants the requester access to the named object—in this case, the region in memory. If the named object is at a remote site, the local capability manager directs the requester, using a new address computation and message, to the remote capability manager. The kernel is also responsible for process synchronization mechanisms and commu- nication support. Typically, synchronization is implemented as some form of shared variable, such as the WAIT and SIGNAL codes discussed in Chapter 6. Communication among distributed objects can be in the form of shared data objects, message objects, or control interactions. Most systems provide different communication primitives to their objects, which are either synchronous (the sender and receiver are linked and ready to send and receive;) or asynchronous (there is some shareable area such as a mailbox, queue, or stack to which the communicated information is sent). In some cases, the receiver periodically checks to see if anyone has sent anything. In other cases, the communicated information arrives at the receiver’s workstation without any effort on the part of the receiver; it just waits. There can also be a combination of these. An example of this communication model might have a mechanism that signals the receiver whenever a communication arrives at the sharable area, so that the information can be fetched whenever it’s convenient. The advantage of this system is that it eliminates unnecessary checking when no messages are waiting. Finally, the kernel environment for distributed systems must have a scheduler with a consistent and robust mechanism for scheduling objects within the system in accordance with its operation’s goals. If the kernel doesn’t already have primitives (such as test-and-set and P and V, as discussed in earlier chapters) to work with the hardware, then the process manager has to create its own primitives before going on with its job. The process manager has responsibility for the following tasks: creating objects, dispatching objects, scheduling objects, synchronizing operations on objects, communicating among objects, and delet- ing objects. To perform these tasks, the process manager uses the kernel environment, which provides the primitives it needs to capture the low-level hardware in the system. For example, to run a database object, the process manager must perform the following steps in order: 1. Is the object in memory? If so, go to Step 3. 2. If the object is not in memory, find it on secondary storage, allocate space in memory for it, and log it into the proper locations. 3. When the object is in memory, provide the proper scheduling information for the object. 4. When the object has been scheduled, wait for the kernel dispatcher to pull it out and place it into the RUNNING state. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 338 DO/S Development Thus far we’ve discussed the similarities between the object-based and process-based managers. The major difference between them is that objects contain all of their state information. This means that the information is stored with the object, not separately in another part of the system, such as in a PCB or other data structure separate from the object. Device Management In all distributed systems, devices must be opened, read from, written to, and closed. In addition, device parameters must be initialized and status bits must be set or cleared— just as in stand-alone systems. All of this can be done on a global, cluster, or localized basis. Usually, users prefer to choose devices by name and let the distributed operating system select and operate the best device from among those available. For example, if users need specific control of a device, then they should be able to call a device by name, such as DISK 12. When the choice is made, the DO/S takes control, allocating the unit when it’s available, assigning it to the user when the OPEN command is issued, operating it, and then deallocating it when the job is finished. The device can’t be allocated until the Device Manager examines the device’s status, determines that it’s free, and sends the requesting process a unique device identifier— a name that’s used for all communication between the process and the device. Later, when the process issues a CLOSE command, the device is released. That’s when the DO/S resets the device’s state information, and returns its device control block to the device’s READY queue. For example, when a user wants to print a file by executing a print command, the DO/S follows a process similar to this: 1. The user’s File Manager places a copy of the file in the DO/S spooler directory. 2. The spooler selects the file from the spooler directory and initiates an OPEN request to the DO/S File Manager. 3. When the OPEN request is satisfied, the spooler initiates another OPEN request 4 to a networked line printer’s device driver. The detailed 4. When the second OPEN request is satisfied, the spooler sends the file to the instructions printer’s input buffer. This can be accomplished through a direct message transfer that instruct the operating or through a packet transfer, as described in Chapter 9. system on how 5. When printing is complete, the DO/S File Manager deletes the copy of the file to successfully from the spooler. allocate and deallocate each 6. Finally, the device is reset and closed. disk drive are contained within This system works only if the operating system keeps a global accounting of each network the device driver device and its availability, maintaining each device’s status record and control block, software. and distributing this information to all sites. As shown in Figure 10.6, the DO/S Device Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 339 Chapter 10 | Management of Network Functions Manager is a collection of remote device drivers connected to and associated with the devices, but controlled by status data that’s provided by the DO/S Device Manager. (figure 10.6) User #1 User Interface DO/S Device Manager Device Manager All devices are operated User #2 by their individual device managers or device driv- User #3 ers using specific status data that’s controlled by Disk Drive Status Printer Status Data the DO/S Device Manager. User n Data and and Device Drivers Device Drivers In this example, the net- work has multiple users, three disk drives, and Disk Drive #1 Printer #1 three printers. Disk Drive #2 Printer #2 Disk Drive #3 Printer #3 Process-Based DO/S All resources in the process-based DO/S are controlled by servers called guardians or administrators. These servers are responsible for accepting requests for service on the individual devices they control, processing each request fairly, providing service to the requestor, and returning to serve others, as shown in Figure 10.7. Here, the WAIT state is used to suspend and resume processing, functioning in the same way as the WAIT state described in Chapter 4. Request Next (figure 10.7) Requestor Process scheduler Dispatcher execution In a process-based DO/S, requests move from the Execute requestor to the pro- cess scheduler, to the Server Resource ­dispatcher, and then to the server. Interrupt Resume Wake up processing manages all Suspend Block device interfacing or pro- Waiting Interrupt cessing problems. However, not all systems have a simple collection of resources. Many have clusters of printers, disk drives, tapes, and so on. To control these clusters as a group, most process- based systems are configured around complex server processes, which manage multiple Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 340 DO/S Development resources or divide the work among subordinate processes. The administrator process is configured as a Device Manager, and includes the software needed to accept local and remote requests for service, to decipher their meaning, and act on them. Typically, a server process is made up of one or more device drivers, a Device Manager, and a network server component. Object-Based DO/S In an object-based DO/S, each device is managed the same way throughout the network. The physical device is considered an object, just like other network resources, and is surrounded by a layer of software that gives other objects a complete view of the object. The physical device is manipulated by a set of operations—explicit commands that 4 mobilize the device to perform its designated functions. For example, an object to control a tape unit requires operations to rewind, fast forward, and scan. To retrieve a Magnetic tape certain record from an archival tape, a user issues an operation on a tape drive object was one of the earliest storage such as this: media, and is still used to perform WITH TAPE 1 DO FAST FORWARD (N) RECORDS routine archiving of system This causes the tape drive to advance N records. This assumes, of course, that the files because ­operating system has already granted the user authorization to use the tape object. sequential writing to tape is fast and straightforward. A disk drive works the same way. Users access the drive by sending operations to the Device Manager to create a new file, destroy an old file, open or close an existing file, read information from a file, or write to a file. Users don’t need to know the underlying mechanisms that implement the operations—they just need to know which operations are enabled. One advantage of an object-based DO/S is that several objects can be assembled to com- municate and synchronize with each other to provide a distributed network of resources, with each object knowing the location of its distributed peers. So, if the local device manager can’t satisfy a user’s request, the request is sent to another device manager, a peer. Again, users don’t need to know if the network’s resources are centralized or distributed—only that their requests are satisfied. For this system to be successful, the Device Manager object at each site needs to main- tain a current directory of device objects at all sites. Then, when a requesting object needs to use a printer, for example, the request is presented to its local device manager. If the local manager has the means and opportunity to provide the proper service, it prints the request. If it can’t meet the request locally, it sends the request to a peer Device Manager that has the appropriate resources. It’s this remote Device Manager that processes the request and performs the operation. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 341 Chapter 10 | Management of Network Functions File Management Distributed file management gives users the illusion that the network is a single logical file system that’s implemented on an assortment of devices and computers. Therefore, the main function of a DO/S File Manager is to provide transparent mechanisms to find, open, read, write, close, create, and delete files no matter where they’re located in the network, as shown in Table 10.3. (table 10.3) Desired File Function File Manager’s Action Typical file management Find and Open Uses a master directory with information about all files stored anywhere functions and the neces- on the system and sets up a channel to the file. sary actions of the File Read Establishes a channel to the file and attempts to read it using simple file Manager. access schemes. However, a read operation won’t be immediately fulfilled if the file is currently being created or modified. Write Sets up a channel to the file and attempts to write to it using simple file access schemes. To write to a file, the requesting process must have exclusive access to it. This can be accomplished by locking the file, a technique frequently used in database systems. While a file is locked, all other requesting processes must wait until the file is unlocked before they can write to or read the file. Close Sends a command to the remote server to unlock a certain file. This is typically accomplished by changing the information in the directory at the file’s storage site. Create Places a unique file identifier in the network’s master directory and assigns space for it on a storage device. Delete Erases the unique file identifier in the master directory and deallocates the space that it occupies on the storage device. Notice that the file is not quickly erased; its space is just marked as available for writing another file. File management systems are a subset of database managers, which provide more capa- bilities to user processes than file systems, and are implemented as distributed database management systems as part of local area network systems. Therefore, the tasks required by a DO/S include those typically found in a distributed database environment. These involve a host of controls and mechanisms necessary to provide consistent, synchronized, and reliable management of system and user informa- tion assets, including the following: Concurrency control Data redundancy Location transparency and distributed directory Deadlock resolution or recovery Query processing Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 342 DO/S Development Concurrency Control 4 Concurrency control techniques give the system the ability to perform concurrent reads The locking and writes, as long as the results of these actions don’t jeopardize the contents of the mechanism (such as locking a database. This means that the results of all concurrent transactions are the same as if database field or the transactions had been executed one at a time, in some arbitrary serial order, thereby record) is one form providing the serial execution view on a database. The concurrency control mechanism of concurrency keeps the database in a consistent state as the transactions are processed. control because it restricts access to only one user For example, let’s say numerous airline passengers are making online plane reservations. or application at By using concurrency control techniques, the File Manager allows each person to read a time. and write to a record on the airline’s huge database if, and only if, each read and write doesn’t interfere with another that’s already taking place. These techniques provide a serial execution view on a database. Data Redundancy Data redundancy (the essence of RAID configurations discussed in Chapter 7) can make files much faster and easier to read. This is because the File Manager can allow a process to read the copy that’s closest or easiest to access. Or, if the file is very large, the read request can be split into several different requests, each of which is fulfilled at a different file loca- tion. For example, if an airline reservation system received a request for information about passengers on a certain flight, and the entire database was stored in three different locations, then one read request could search the passengers with last names beginning with A–K, the second read request could search L–R, and the third read request could search S–Z. Then, the results of all three requests are combined before returning the results to the requester. Data redundancy also has beneficial aspects from a disaster recovery standpoint because, if one site fails, operations can be restarted at another site with the same resources. Later, the failed site can be reinstated by copying all the files that were updated since the failure. The disadvantage of redundant data is the task of keeping multiple copies of the same file up-to-date at all times. Every time a file is updated, every other copy of the file must be updated in an identical way; and the update must be performed in strict adherence to the system’s reliability standards. Based on the algorithm used and the method of recovery, the system can require that updates be performed at all sites before any reads occur to a master site, or to a majority of sites. Some typically used update algorithms are: unanimous agreement, primary site copy, moving primary site, and majority site agreement. Location Transparency and Distributed Directory Location transparency means that users don’t need to be concerned with the physical location of their files. This is the essence of cloud computing. Instead, users deal with Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 343 Chapter 10 | Management of Network Functions the network as a single system. Location transparency is provided by mechanisms and directories, which map logical data items to physical locations. The mechanisms usu- ally use information about data, which are stored at all sites in the form of directories. The distributed directory manages the transparency of the data location and enhances data recovery for users. The directory contains definitions dealing with the physical and logical structure for the stored data, as well as the policies and mechanisms for map- ping between the two. In addition, it contains the names of all system resources, and the addressing mechanisms for locating and accessing them. Deadlock Resolution or Recovery Deadlock detection and recovery, which were described in detail in Chapter 5, are critical issues for administrators of distributed systems. The most important function is to detect and recover from a circular wait. This occurs when one process requests a resource (such as a file, disk drive, modem, or tape unit), which we call Resource B, while it keeps exclusive control over another resource, which we call Resource A. Mean- while, a second process requests use of Resource A while it keeps exclusive control over Resource B. A directed graph for this example is shown in Figure 10.8. Directed graphs were introduced in Chapter 5. The solid lines represent resources allocated to processes, and the dotted lines represent resources requested by processes, but not yet allocated to them. (figure 10.8) Resource A Process 1 This directed graph of a circular wait was created when Process 1 requested Resource B without ­releasing its exclusive Process 2 Resource B ­control over Resource A. Likewise, Process 2 requested Resource A without releasing Resource B, thus, creating a deadlock. However, most real-life examples of circular waits are much more complex and difficult to detect because they involve multiple processes and multiple resources—all of which are waiting for a resource that is being held exclusively by another process. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 344 DO/S Development Deadlock detection, prevention, avoidance, and recovery are all strategies used by a distributed system. To detect circular waits, the system uses directed resource graphs and looks for cycles. To prevent circular waits, the system tries to delay the start of a transaction until it has all the resources it will request during its execution. To avoid circular waits, the system tries to allow execution only when it knows that the transaction can run to completion. To recover from a deadlock caused by circular waits, the system selects the best victim—one that can be restarted without much difficulty, and one that, when ter- minated, will free enough resources so that the others can finish. Then the system kills the victim, forces that process to restart from the beginning, and reallocates its resources to other waiting processes. Query Processing Query processing is the function of processing requests for information. Query process- ing techniques try to increase the effectiveness of global query execution sequences, local site processing sequences, and device processing sequences. All of these relate directly to the network’s global process scheduling problem. Therefore, to ensure consistency of the entire system’s scheduling scheme, the query processing strategy must be an integral part of the processing scheduling strategy. Network Management The network management function is a communications function that’s unique to net- worked systems, because stand-alone operating systems don’t need to communicate with other systems. For a DO/S, the Network Manager provides the policies and mechanisms necessary to provide intrasite and intersite communication among concurrent processes. For intrasite processes (those within the network), the Network Manager provides process identifiers and logical paths to other processes—in a one-to-one, one-to-few, one-to-many, or one-to-all manner—while dynamically managing these paths. The Network Manager has many diverse responsibilities. It must be able to locate pro- cesses in the network, send messages throughout the network, and track media use. In addition, it must be able to reliably transfer data, code and decode messages, retransmit errors, perform parity checking, do cyclic redundancy checks, establish redundant links, and acknowledge messages and replies, if necessary. Figure 10.9 shows the first step for linking to a virtual private network (VPN) using an Android operating system on a cell phone. VPNs are the subject of a research topic at the end of this chapter. Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203 345 Chapter 10 | Management of Network Functions (Figure 10.9.) Using the Android oper- ating system, users can log into a virtual private network (VPN), which can be used to connect off-site

Use Quizgecko on...
Browser
Browser