Concepts with Symbian OS (779878), страница 46
Текст из файла (страница 46)
Enabling the various componentsto be shared is another aspect of computer systems that is common for allcomponents. Finally, communication has been prevalent among all thecomponents involved in running a computer system.Communication networks have extended the CPU processing, memory, data storage, and I/O capabilities of computers. As operating systemshave been developed to address such extensions, they have used abstraction, sharing and communication to facilitate design.EXTENDING COMPUTERS IN A CONNECTED ENVIRONMENT10.2217Extending Computers in a Connected EnvironmentNetworks have allowed the extensions of computers in many ways. Thenature of these extensions is heavily influenced by the interconnectionsthat are possible over the network. We consider the way that communication networks operate first, then apply those networks to the componentsdiscussed in Section 10.1.The Nature of InterconnectionThere are many ways to communicate electronically and many types ofnetwork that can facilitate communication between computers.
Despitethis variety, interconnections have many things in common.Networks start with a communications medium. This medium is themethod used to connect the computers within the network. Many possibilities exist today. Local area networks (LANs) are networks containedin small geographic areas, such as a single building or a neighborhood.
LANs usually are connected with wires through twisted-pair orfiber-optic cables. Wireless LANs have grown in popularity, connectingcomputers through a central transmitter-access point. Bluetooth has alsorecently emerged as a radio-based, wireless communication medium.Bluetooth is a protocol that enables communication between radio transmitters.Networks have a topology, which is the set of characteristics thatdescribe how computers in the network are physically connected.These topologies (see Figure 10.1) are influenced by the communicationmedium and can be characterized by the following criteria:• connections : the number of physical connections and the numberof computers connected; connections contribute to issues such asrouting of messages and the way that storage is managed• installation : topologies can be vastly different in the ways they arephysically connected and the initial effort required to make thoseconnections• cost of communication : the time and money it takes to communicateover the network influences and characterizes the topology• availability : topologies can make data more susceptible to failures orcan make access more resilient.218NETWORKSNetworks are characterized by the connection strength betweencomputers.
Loosely coupled connections offer networks where not allcomputers are required for the network to function and the connectivityof computers on the network and between themselves can come and goat will. Examples of loosely coupled connections include mobile devicesthat share data across mobile networks and web browsers using webservices. Tightly coupled networks are those with computers who areclosely dependent on each other and the operating system on each isdependent on the presence of others.
Examples of tightly coupled systemsinclude mobile phone networks and the Internet itself. Loosely couplednetworks tolerate failure and reconfiguration much better than tightlycoupled networks.ABAFCEBFCDEDFully connected networkRing networkAABCFCBDFEEStar networkTree-structured networkACBDEDGFBus-structured networkFigure 10.1 Network topologiesEXTENDING COMPUTERS IN A CONNECTED ENVIRONMENT219The protocols that run over network connections are part of whatmakes networks unique.
A protocol is the exchange of meta-informationover a network that makes it possible to send real content. Protocols areas varied as the types of network. The token-ring protocol is designedfor circular networks, such as the ring network shown in Figure 10.1.TCP/IP is a network protocol for LANs, which was originally designedto run over a bus topology as shown in Figure 10.1, but has been runover other topologies as well. The Bluetooth protocol is designed toallow Bluetooth peer-to-peer communication. The topology of a networkdeeply influences the choice of protocol.Protocols can co-exist on many types of network. Where networks arepassive – that is, they transfer any and all data sent over them – multipleprotocols can co-exist because the medium tolerates any kind of data.Where networks are active or highly specialized, the base protocol canrun other protocols by treating those protocols as applications that aresimply sending data. This protocol encapsulation approach has several applications.The choice of protocol for a network also dictates how computers areaddressed across a network.
Addresses are required on a network so thatcomputers can specifically address other computers. Addressing differsfrom network to network, depending on the needs of the protocol. TCP/IPnetworks have IP addresses in the form 192.168.1.250 while Bluetoothaddresses are of the form 01:33:FA:72:45:1B. The protocols can decipherthe meaningful parts of the address and use those parts to make sureinformation arrives at its destination.The combination of addressing and unique protocols provides networks with ways to route data.
Token rings pass data between computersby sending the data around the ring, allowing it to pass throughintermediate computers before arriving at the destination. TCP/IP routingis a combination of local area broadcasting and ‘next-hop’ routing, wheredata not destined for the local network is channeled through a specialcomputer – called a router – that sends the data on to either the nextnetwork or the next router.Distributed ProcessingNetworks extend a computer’s CPU power by enabling distributed processing. Processing can be distributed across a network by distributingthe operating system, distributing the computing power, or both.220NETWORKSDistributing the operating system can be as simple as having multiplecomputers with their own operating system on a network or as complicated as having a single operating system that governs many differentcomputers.
While these approaches sound the same, their implementations are quite different. Cooperating network-based computers are quitecommon and usually share their resources in loosely coupled ways. It isnot uncommon for a computer on a network to share its file or printerresources. In this type of loose distributed environment, the operating systems must extend the implementation of resources while the abstractionof resources remains the same.One way multiple computers share CPU resources is through clustering. A computing cluster is a collection of computers which have theirown operating systems but implement message passing between networknodes. This message passing includes the allocation of workloads to eachcomputer.
In this scenario, each computer is independent but works withthe others. Each accepts commands from a central computer in additionto accepting workload allocation from other nodes in the network. Inorder for clusters to work well, the interconnection mechanisms must befast and reliable. Each computer on the network is independent and relieson the communication medium to make cooperation work.One popular way to cluster computers for distributed processing isa Beowulf1 cluster, a group of desktop computers (usually) running aUnix operating system.
They are networked into a LAN and have librariesand programs installed which allow processing to be shared amongthem. Beowulf clusters originated in technology created by the UnitedStates National Aeronautics and Space Administration (NASA). There is noparticular piece of software that defines a cluster as a Beowulf. Commonlyused parallel processing libraries include the message-passing interface(MPI) and parallel virtual machine (PVM) APIs.
Both of these permit theprogrammer to divide a task between networked computers and collectthe results of processing.In some configurations, computers are governed by a single operatingsystem. This type of implementation involves tight interdependence oneach other. In these environments, copies of the operating system runon all computers and these copies are coordinated by messages sentbetween them.
This cooperation orchestrates the sharing of workloadand manipulates the computers in such a way that computation isdivided amongst all of them. A good example here is a now-defunct1The name comes from the main character in the Old English epic Beowulf.EXTENDING COMPUTERS IN A CONNECTED ENVIRONMENT221operating system called DomainOS.
DomainOS was implemented acrossa collection of computers, each of which ran the entire operating system.Each computer, by itself, could act independently when alone, butshared workload when it sensed others on a network with it. Even asimple command might run on another computer in the network.Computers on a network interact as servers and clients. The mosttypical way for computers to cooperate on a network is via a client–serverrelationship, where the client makes requests that the server receives andservices. Most distributed computing is done via message-passing, whereeach computer acts as a peer – that is, as both client and server. Eachsends requests and each can receive requests.Distributed systems can work together in several ways:• single instruction, multiple data (SIMD) occurs when multiple computers run the same instructions in the same sequence and insynchronization with each other; each computer works on a different data set or data stream; this is a tightly coupled, very dependentenvironment• multiple instructions, single data (MISD) environments are usuallycalled vector processors; each processor works on data and passesthe stream to the next processor, which does its work and passes thestream to the next processor, and so forth; MISD processors each run aminimal operating system and accept their multiple instructions froma central source• multiple instructions, multiple data (MIMD) environments are looselycoupled environments where the processors cooperate yet work quiteindependently; networks and clusters represent this type of environment.There is, of course, the SISD environment: the single instruction, singledata set environment.
From a distributed processor point of view, this isa single computer without any distribution at all.Sharing MemoryCommunication can also expand an operating system’s view of memory.Shared memory can take several forms, each expanding operating systemsin different ways.One way to share memory is to have a large area of RAM accessibleby multiple processors. In this situation, the processors probably also222NETWORKSuse caches to speed up access to recently manipulated data, but nowthis cached data needs to be flushed much more often, as it needs to beaccessible to all computers in the environment. Unless caches are flushedrapidly, coherence problems spring up: processors might not be workingon the same instance of information.