• No results found

Advanced Computing Concepts – A Survey 153 

In document computer fundamentals (Page 153-165)

Learning Objective

After completing this module, you will be able to:

‰ Understand pipelining and parallelism concepts ‰ Know Client-Server Concepts

‰ Understand Multiprocessor Organization

Pipelining

The Performance of a computer depends on

‰ The way in which Compiler translates programs into machine language ‰ Choice of machine language instructions

‰ The design of hardware ‰ Concept of Parallelism ‰ Cache Memory concept

‰ Measure of performance - Processor clock cycle ‰ Execution Time, T in seconds is given by

T = (N x S) / R

o where N = No. of Machine language instructions o S = Average number of basic steps per instruction o R = Clock rate in Cycles / second

‰ Improvement in the performance by PIPELINING techniques ‰ RISC and CISC processors

What is Pipelining?

‰ “Increasing concurrency by dividing a computation into a number of steps and allowing a number of tasks to be in various stages of execution at the same time.”

‰ Pipelining is the effective way of organizing parallel activity in a computer System ‰ It is a technique of decomposing a sequential process into sub operations, with each

sub process being executed in a special dedicated segment that works concurrently with all other segments

‰ Any operation that can be decomposed into a sequence of sub operations of about the same complexity can be implemented by a pipeline processor

‰ This technique is efficient for those applications that need to repeat the same task many times with different sets of data

Example 8.1

We want to perform the combined multiply and add operations with a stream of numbers. Ai * Bi + Ci for i = 1,2,3,..,7

R1 through R5 are registers that receive new data with every clock pulse The sub operations performed are:

R1 ← Ai, R2 ← Bi R3 ← R1*R2, R4 ← Ci R5 ← R3 + R4 Ai Bi Ci R1 R3 R2 R5 R4 Multiplier Adder

Fig 8.1: Arithmetic Pipeline Scheme – An Example

Example 8.1 (Contd.) Clock Pulse

Number

Segment1 Segment2 Segment3

R1 R2 R3 R4 R5 1 2 3 4 5 6 7 8 9 A1 A2 A3 A4 A5 A6 A7 ---- ---- B1 B2 B3 B4 B5 B6 B7 ---- ---- ---- A1* B1 A2* B2 A3* B3 A4 B4 A5* B5 A6* B6 ---- ---- C1 C2 C3 C4 C5 C6 -- ---- ---- A1*B1+C1 A2*B2 +C2 A3*B3 +C3 A4*B4 +C4 A5*B5 +C5 A6*B6 +C6 A7*B7 +C7

‰ There are 2 areas of computer design where the pipeline organization is applicable: o An arithmetic pipeline divides an arithmetic operation into suboperations for

execution in the pipeline segments

o An instruction pipeline operates on a stream of instructions by overlapping the fetch, decode and execute phases of the instruction cycle

‰ With a four-stage pipeline, the rate at which instructions are executed is almost four times that of sequential operation

‰ Pipelining does not speed up the time required for the execution of an instruction ‰ Pipelining results in more throughput (Number of Instructions per second)

Effect of operation that takes more than 1 clock cycle

‰ Stalling of pipeline operation

‰ Possible reasons for Stalling of Pipeline operation o Some Arithmetic operations

o Cache miss o Page fault

o Some logic operations o Divide operations

Why can’t the pipeline operate at its maximum theoretical speed?

‰ Different segments may take different times to complete their suboperation. The clock cycle must be chosen to equal the time delay of the segment with maximum

propagation time. This causes all other segments to waste time while waiting for the next clock

‰ The time delay for a pipeline circuit is usually greater than the nonpipeline equivalent circuit

Parallelism

Parallelism is the simultaneous execution of the same task (split up and specially adapted) on

multiple processors in order to obtain results faster. The idea is based on the fact that the process of solving a problem usually can be divided into smaller tasks, which may be carried out

simultaneously with some coordination.

Massive parallelism (MP) is a term used in computer architecture, reconfigurable computing,

application-specific integrated circuit (ASIC) and field-programmable gate array (FPGA) design. It signifies the presence of many independent arithmetic units or entire microprocessors, that run in parallel. Today's most powerful supercomputers are all MP systems such as Earth Simulator,

Blue Gene, ASCI White, ASCI Red, ASCI Purple, ASCI Thor's Hammer.

Task

Parallel Tasks

Tasks whose computations are independent of each other, so that all such tasks can be performed simultaneously with correct results.

Serial Execution

Execution of a program sequentially, one statement at a time.

Parallelizable Problem

A problem that can be divided into parallel tasks. This may require changes in the code and/or the underlying algorithm.

Flynn’s Classification

Computers can be classified with respect to their parallel processing capability; the following 4 categories are relevant:

Single instruction, single data stream – SISD

‰ A serial (non-parallel) computer

‰ Single instruction: only one instruction stream is being acted on by the CPU during any one clock cycle

‰ Single data: only one data stream is being used as input during any one clock cycle ‰ Deterministic execution

‰ This is the oldest and until recently, the most prevalent form of computer ‰ Examples: most PCs, single CPU workstations and mainframes

Fig 8.2: SISD Process

Single Instruction, Multiple Data (SIMD):

‰ A type of parallel computer

‰ Single instruction: All processing units execute the same instruction at any given clock cycle

‰ This type of machine typically has an instruction dispatcher, a very high-bandwidth internal network, and a very large array of very small-capacity instruction units. ‰ Best suited for specialized problems characterized by a high degree of regularity,such

as image processing.

‰ Synchronous (lockstep) and deterministic execution ‰ Two varieties: Processor Arrays and Vector Pipelines ‰ Examples:

o Processor Arrays: Connection Machine CM-2, Maspar MP-1, MP-2

o Vector Pipelines: IBM 9000, Cray C90, Fujitsu VP, NEC SX-2, Hitachi S820

Fig 8.3: SIMD Process

Multiple Instruction, Single Data (MISD):

‰ A single data stream is fed into multiple processing units.

‰ Each processing unit operates on the data independently via independent instruction streams.

‰ Few actual examples of this class of parallel computer have ever existed. One is the experimental Carnegie-Mellon C.mmp computer (1971).

‰ Some conceivable uses might be:

o Multiple frequency filters operating on a single signal stream

Fig 8.4: MISD Process

Multiple Instruction Multiple Data (MIMD):

‰ Currently, the most common type of parallel computer. Most modern computers fall into this category.

‰ Multiple Instruction: every processor may be executing a different instruction stream ‰ Multiple Data: every processor may be working with a different data stream

‰ Execution can be synchronous or asynchronous, deterministic or non-deterministic ‰ Examples: most current supercomputers, networked parallel computer "grids" and

multi-processor SMP computers - including some types of PCs.

Fig 8.5: MIMD Process

Client – Server

Definition: The data processing interaction in which a program at one site (the client) sends a

request to a program at another site (the server) and awaits a response.

Introduction: Client server is network architecture which separates a client from a server. Each

instance of the client software can send requests to a server. Specific Types of servers include: application servers, file servers, terminal servers, and mail servers.

Characteristics of a server: ‰ Passive (slave) ‰ Waits for requests

‰ Upon receipt of requests, processes them and then serves replies Characteristics of a client:

‰ Active (master) ‰ Sends requests

‰ Waits for and receives server replies

Client/server describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfills the request. Although the client/server idea can be used by programs within a single computer, it is a more important idea in a network. In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations.

Architecture

Generic client/server architecture has two types of nodes on the network: clients and servers. As a result, these generic architectures are sometimes referred to as "two-tier" architectures.

Some networks will consist of three different kinds of nodes: server, application servers which process data for the clients and database servers which store data for the application servers. This is called three-tier architecture.

Client Server Model

Fig 8.6: Client Server Model

Client/server describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfils the request. In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. The communications method in computing includes Local procedure calls and Remote procedure calls.

Remote Procedure Call:

This is a protocol that one program can use to request the services from other located in other machine in a network without having to understand the network details. Usually when a program using RPC are compiled into an executable program, a stub is included which acts as the representative of remote procedure code. When the program is run, and the procedure issue the stub receives a request and forwards it to the client runtime in the local computer by the daemons. The client runtime program knows the address of the remote computer and server application. It then sends the request across the network .The server also have a runtime program and stub that interface with remote procedure. The result is returned the same way.

Local Procedure Call:

A local procedure call (LPC) is an interprocess communication facility for high-speed message passing. In Windows NT, client-subsystem communication happens in a fashion similar to that in the MACH operating system. Each subsystem contains a client-side DLL that links with the client executable.

The DLL contains stub functions for the subsystem’s API. The subsystem process, after the necessary processing, returns the results to the client DLL. The stub function in the DLL waits for the subsystem to return the results and, in turn, passes the results to the caller. The client process simply resembles calling a normal procedure in its own code. In the case of RPC, the client actually calls a procedure sitting in some remote server over the network–hence the name remote procedure call. In Windows NT, the server runs on the same machine; hence the mechanism is called as a local procedure call.

Server

A computer or device on a network that manages network resources. For example, a file server is a computer and storage device dedicated to storing files. Any user on the network can store files on the server. A print server is a computer that manages one or more printers, and a network

server is a computer that manages network traffic. A database server is a computer system that

processes database queries.

Server Types

This list, the many different types of servers used in the marketplace today:

Server Platforms

A term often used synonymously with operating

system, a platform is the underlying hardware

or software for a system and is thus the engine that drives the server.

Application Servers

Sometimes referred to as a type of middleware, application servers occupy a large chunk of computing territory between database servers and the end user, and they often connect the two.

Audio/Video Servers

Audio/Video servers bring multimedia capabilities to Web sites by enabling them to broadcast streaming multimedia content.

Chat Servers

Chat servers enable a large number of users to exchange information in an environment similar to Internet newsgroups that offer real-time discussion capabilities.

Fax Servers

A fax server is an ideal solution for

organizations looking to reduce incoming and outgoing telephone resources but that need to fax actual documents.

FTP Servers

One of the oldest of the Internet services, File Transfer Protocol makes it possible to move one or more files securely between computers while providing file security and organization as well as transfer control.

Groupware Servers

A groupware server is software designed to enable users to collaborate, regardless of location, via the Internet or a corporate intranet and to work together in a virtual atmosphere.

IRC Servers

An option for those seeking real-time discussion capabilities, Internet Relay Chat consists of various separate networks (or "nets") of servers that allow users to connect to each other via an IRC network.

List Servers

List servers offer a way to better manage mailing lists, whether they be interactive discussions open to the public or one-way lists that deliver announcements, newsletters, or advertising.

Mail Servers

Almost as ubiquitous and crucial as Web servers, mail servers move and store mail over corporate networks (via LANs and WANs) and across the Internet.

News Servers

News servers act as a distribution and delivery source for the thousands of public news groups currently accessible over the USENET news network.

Proxy Servers

Proxy servers sit between a client program (typically a Web browser) and an external server (typically another server on the Web) to filter requests, improve performance, and share connections.

Telnet Servers

A Telnet server enables users to log on to a host computer and perform tasks as if they're working on the remote computer itself.

Web Servers

At its core, a Web server serves static content to a Web browser by loading a file from a disk and serving it across the network to a user's Web browser. This entire exchange is

mediated by the browser and server talking to each other using HTTP.

File Server

In telecommunication, the term file server has the following meanings:

‰ A form of disk storage that hosts files within a network; file servers do not need to be high-end but must have enough disk space to incorporate a large amount of data. Many people mistake file servers for a high-end storage system, but in reality, file servers do not need to possess great power or super fast computer specifications. ‰ A computer program, that allows different programs, running on other computers, to

access the files of that computer

‰ In common parlance, the term file server refers specifically to a computer on which a user can map or mount a drive or directory so that the directory appears to be on the machine at which the user is sitting. Additionally, on this type of file server, the user can read or write a file as though it were part of the file system of the user's computer.

Compute Server

A computer cluster is a group of loosely coupled computers that work together closely so that in many respects they can be viewed as though they are a single computer. The components of a cluster are commonly, but not always, connected to each other through fast local area networks. Clusters are usually deployed to improve performance and/or availability over that provided by a single computer, while typically being much more cost-effective than single computers of comparable speed or availability.

Database Server

A Data Server manages data and is typically one or more of many servers in an environment A database server is a computer program that provides database services to other computer programs or computers, as defined by the client-server model. The term may also refer to a computer dedicated to running such a program. Database management systems frequently provide database server functionality, and some DBMS's (e.g., MySQL) rely exclusively on the client-server model for database access.

Database Master servers are central and main locations of data while Database Slave servers are synchronized backups of the master acting as proxies.

Communication Server

Definition: A specialized network server that provides access to resources on the network for

users not directly attached to the network or that permits network users to access external resources not directly attached to the network.

Introduction:

Communications servers are open, standards-based computing systems that operate as a carrier- grade common platform for a wide range of communications applications and allow equipment providers to add value at many levels of the system architecture.

Support for communications servers as a category of server is developing rapidly throughout the communications industry. Standards bodies, industry associations, vendor alliance programs, hardware and software manufacturers, communications server vendors and users are all part of an increasingly robust communications server ecosystem.

Regardless of their specific, differentiated features, communications servers have the following attributes: open, flexible, carrier-grade, and communications-focused.

Multiprocessor Organization

Introduction:

To use multiple processors for parallel execution of programs to improve performances. There are three solutions:

‰ Symmetric Multi Processors: several identical processors within the same computer ‰ Clusters: a group of interconnected computers working together as a unified

computing resource

‰ Non Uniform Memory Access: a shared-memory multi-processor architecture for which

the access time to a memory words depends on the location of the word and on the processor accessing it.

Summary

‰ Pipelining is an effective way of organizing parallel activity in a computer System ‰ There are 2 areas of computer design where the pipeline organization is applicable:

o An arithmetic pipeline divides an arithmetic operation into sub-operations for execution in the pipeline segments

o An instruction pipeline operates on a stream of instructions by overlapping the fetch, decode and execute phases of the instruction cycle

‰ Flynn’s Classification of Parallel Computers ‰ Various types of Servers and their Applications

‰ Performance improvement through Multiprocessor Organization

Test your Understanding

1. Which of the following is TRUE about Pipelining?

a. Pipelining doesn’t speed up the rate of execution of instruction b. Throughput remains the same in pipelining

c. Stalling cannot happen in a Pipeline d. None of the above

2. What is parallelism?

3. Is MISD implementation viable?

4. What is two-tier and three-tier architectures?

5. Which protocol is used for browsing web pages in the web server context?

Answer:

In document computer fundamentals (Page 153-165)