














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















Parallel processing architectures and challenges, Hardware multithreading, Multicore and shared memory multiprocessors, Introduction to Graphics Processing Units, Clusters and Warehouse scale computers – Introduction to Multiprocessor network topologies.
The difficulty with parallelism is not the hardware. It is difficult to write software that uses multiple processors to complete one task faster, and the problem gets worse as the number of processors increases. Parallel processing programs been so much harder to develop than sequential programs. The reason is to get better performance or better energy efficiency from a parallel processing program on a multiprocessor; or it is enough to use a sequential program on a uniprocessor, as sequential programming is simpler. Uniprocessor design techniques such as superscalar and out-of order execution take advantage of instruction-level parallelism. Such innovations reduced the demand for rewriting programs for multiprocessors. Parallel processing programs is difficult to write since they are fast, especially as the number of processors increases For both this analogy and parallel programming, the challenges include
What percentage of the original computation can be sequential to achieve a speed-up of 90 times faster with 100 processors?
Amdahl’s Law says,
Amdahl’s Law in terms of speed-up versus the original execution time:
This formula is usually rewritten assuming that the execution time before is 1 for some unit of time, and the execution time affected by improvement is considered the fraction of the original execution time:
Substituting 90 for speed-up and 100 for amount of improvement into the formula above:
Then simplifying the formula and solving for fraction time affected:
Thus, to achieve a speed-up of 90 from 100 processors, the sequential percentage can only be 0.1%. Thus to achieve good speed-up on a multiprocessor the entire program must usually be parallel with no serial portions. Programs do not operate in fully parallel or sequential mode, but it can use less than the full complement of the processor when running in parallel mode.
Suppose you want to perform two sums: one is a sum of 10 scalar variables, and one is a matrix sum of a pair of two-dimensional arrays, with dimensions 10 by 10. For now let’s assume only the matrix sum is parallelizable; we’ll see soon how to parallelize scalar sums. What speed- up do you get with 10 versus 40 processors? Next, calculate the speed- ups assuming the matrices grow to 20 by 20. If we assume performance is a function of the time for an addition, t, then there are 10 additions that do not benefit from parallel processors and 100 additions that do. If the time for a single processor is 110 t, the execution time for 10 processors is
So the speed-up with 10 processors is 110t/20t = 5.5. The execution time for 40 processors is
The speed-up drops from 20.5 to 410t/30t = 14. The remaining 39 processors are utilized less than half the time: while waiting 20t for hardest working processor to finish, they only compute for 380t/39 = 9.7t. If one processor has 12.5% of the load, it must perform 50 additions. The formula is:
The speed-up drops even further to 410t/60t = 7. The rest of the processors are utilized less than 20% of the time (9t/50t). This example demonstrates the importance of balancing load, for just a single processor with twice the load of the others cuts speed-up by a third, and five times the load on just one processor reduces speed-up by almost a factor of three.
One categorization of parallel hardware proposed by Michael Flynn in the 1960s is still used today. It was based on the number of instruction streams and the number of data streams.
The above figure shows the categories. Thus, a conventional uniprocessor has a single instruction stream and single data stream, and a conventional multiprocessor has multiple instruction streams and multiple data streams. These two categories are abbreviated SISD and MIMD, respectively. FLYNN‘S TAXONOMY Flynn looked at the parallelism in the Instruction and data stream called at the most constrained component of the multiprocessor, and placed all computers into one of four categories.
functional unit, but all functional units are control by a single control unit.
Single instruction stream, Multiple Data Stream (SIMD) This category corresponds to array processors. They have multiple processing / executing units and one control unit. Therefore, all processing / executing units are supervised by the single control unit. Here all processing elements received same instruction from control unit but operate on different data set from distinct data streams. SIMD computers operate on vectors of data. A single SIMD instruction might add 64 numbers by sending 64 data streams to 64 ALUs to form 64 sums within a single clock cycle. The virtues of SIMD are that all the parallel execution units are synchronized and they all respond to a single instruction that emanates from a single program counter (PC). From a programmer’s perspective, this is close to the already familiar SISD. Although every unit will be executing the same instruction, each execution unit has its own address registers, and so each unit can have different data addresses. The original motivation behind SIMD was to amortize the cost of the control unit over dozens of execution units. Another advantage is the reduced instruction bandwidth and space SIMD needs only one copy of the code that is being simultaneously executed.
Multiple instruction streams, Single Data Stream (MISD) Not many parallel processors fit well into this category. In MISD, there are n processors units. Each processor receives distinct instructions operating over the same data stream and its derivatives. The results of one processor become the input of the next processor in the
operate on them sequentially in registers using pipelined execution units, and then write the results back to memory. A key feature of vector architectures is then a set of vector registers. Thus, vector architecture might have 32 vector registers, each with 64 64-bit elements.
Vector instructions have several important properties compared to conventional instruction set architectures, which are called scalar architectures in this context:
For these reasons, vector operations can be made faster than a sequence of scalar operations on the same number of data items, and designers are motivated to include vector units if the application domain can often use them.
The above figure illustrates how to improve vector performance by using parallel pipelines to execute a vector add instruction. Vector arithmetic instructions allow N elements one vector register to take part in operations with N elements from other vector registers. This simplifies the construction of a highly parallel vector unit, which can be structured as multiple parallel vector lanes. For traffic highway, we can increase the throughput of a vector unit by adding more lanes.
The above figure shows the structure of a four-lane vector unit. Thus, going to four lanes from one lane reduces the number of clocks per vector instruction by a factor of four. Generally, vector architectures are a very efficient way to execute data parallel processing programs; they are better matches to compiler technology than multimedia extensions; and they are easier to evolve over time than the multimedia extensions to the x86 architecture.
the stall must fill the pipeline before instructions will be able to complete. Advantage of Coarse-grained multithreading: It is much more useful for reducing the penalty of high-cost stalls, where pipeline refill is negligible compared to the stall time.
The above figure illustrates the differences in a processors ability to utilize superscalar resources for the following processor configurations. The top portion shows how four threads would execute independently on a superscalar with no multithreading support. The
bottom portion shows how the four threads could be combined to execute on the processor more efficiently using three multithreading options:
A CPU core consists of Register File and ALU. Multicore processor supports simultaneous execution of multiple threads. It enables multiple cores to share resources such as memory controller and improve the utilization of the resources. In a single core CPU we have bus interface and system bus. A multicore has multiple core on a single die. It contains more than one processor. E.g. Dual core, Quadracore.. A typical structure of a multicore is as follows. The cores in multicore processor work independently and hence the speed is improved. Multicore processor typically shares resources such as second level cache or memory and I/O bus. Multicore processors are MIMD i.e. each processor is executing its own instruction stream. Different cores execute different process. Process is a segment of code which runs independently. Multicore processor executes a single program by sharing code and their address space and the shared code are called as threads. MIMD with n processors runs n threads. The independent threads are identified by programmer or by compiler. MIMD achieves Thread level parallelism. Depending on the number of cores involved, the MIMD multiprocessor is divided into two classes.
Synchronization:
A major driving force for improving graphics processing was the computer game industry, both on PCs and in dedicated game consoles such as the Sony PlayStation. The graphics and game community had different goals than the microprocessor development community, and evolved its own style of processing and terminology. As the graphics processors increased in power, they earned the name Graphics Processing Units or GPUs. Key characteristics as to how GPUs vary from CPU's:
NVIDIA GPU Architecture:
Nvidia Corporation is an American technology company incorporated in Delaware and based in Santa Clara, California. It designs graphics processing units (GPUs) for the gaming and professional markets as well as system on a chip units (SoCs) for the mobile computing and automotive market. Its primary GPU product line, labeled "GeForce". NVIDIAs CUDA (Compute Unified Device Architecture), which enables the programmer to write C programs to execute on GPUs. Like vector architectures, GPUs works with data-level parallel problems. GPU processors have more registers than vector processors. Unlike most vector architectures, GPUs also depends on hardware multithreading within a single multi-threaded SIMD processor to hide memory latency. A GPU contains a collection of multithreaded SIMD processors; that is, a GPU is a MIMD composed of multithreaded SIMD processors. NVIDIA has four implementations of the Fermi architecture at different price points with 7, 11, 14, or 15 multithreaded SIMD processors. To provide transparent scalability across models of GPUs with differing number of multithreaded SIMD processors, the Thread Block Scheduler hardware assigns blocks of threads to multithreaded SIMD processors. The below figure shows a simplified block diagram of a multithreaded SIMD processor.
SIMD Thread
Similarities and differences between Multicore with SIMD and GPU
The processors have their own private physical address space to share an address space
The above figure shows the classic organization of a multiprocessor with multiple private address spaces. This multiprocessor must communicate via explicit message passing. Message passing - Communication between multiple processors by explicitly sending and receiving information. The system has routines to send and receive messages, and coordination is built in with message passing, since one processor knows when a message is sent, and the receiving processor knows when a message arrives. If the sender needs confirmation, the receiving processor can then send an acknowledgment message back to the sender. Send message routine - A routine used by a processor in machines with private memories to pass a message to another processor. Receive message routine - A routine used by a processor in machines with private memories to accept a message from another processor. Some concurrent applications run well on parallel hardware, independent of whether it offers shared addresses or message passing. In particular, task-level parallelism and applications with little communication like Web search, mail servers, and file servers do not require shared addressing. As a result, clusters have become the most widespread example today of the message-passing parallel computer.
CLUSTERS Clusters - Collections of computers connected via I/O over standard network switches to form a message passing multiprocessor. Each node of a cluster has separate memory and runs a distinct copy of the operating system. The cores inside a microprocessor are connected using a high-speed network inside the chip, and a multichip shared memory system uses the memory interconnect for communication. The memory interconnect has higher bandwidth and lower latency, allowing much better communication performance for shared memory multiprocessors.
so the operational costs add up: energy, power distribution, and cooling represent more than 30% of the costs of a WSC over 10 years.
Cloud Computing: Cloud computing means anyone anywhere with good ideas, a business model, and a credit card can tap thousands of servers to deliver their vision almost instantly around the world. Of course, there are important obstacles that could limit the growth of cloud computing—such as security, privacy, standards, and the rate of growth of Internet bandwidth.
A Network Topology is the arrangement with which computer systems or network devices are connected to each other. Topologies may define both physical and logical aspect of the network. Both logical and physical topologies could be same or different in a same network.
Point-to-Point Point-to-point networks contains exactly two hosts such as computer, switches or routers, servers connected back to back using a single piece of cable. Often, the receiving end of one host is connected to sending end of the other and vice-versa.
If the hosts are connected point-to-point logically, then may have multiple intermediate devices. But the end hosts are unaware of underlying network and see each other as if they are connected directly.
Bus Topology
In case of Bus topology, all devices share single communication line or cable. Bus topology may have problem while multiple hosts sending data at the same time. It is one of the simple forms of networking where a failure of a device does not affect the other devices. But failure of the shared communication line can make all other devices stop funct ioning.Both ends of the shared chan nel have line termi nator.
The data is sent in only one direction and as soon as it reaches the extreme end, the terminator removes the data from the line.
Star Topology All hosts in Star topology are connected to a central device, known as hub device, using a point-to-point connection. That is, there exists a point to point connection between hosts and hub. The hub device can be any of the following:
Star topology is not expensive as to connect one more host, only one cable is required and configuration is simple.
Ring Topology In ring topology, each host machine connects to exactly two other machines, creating a circular network structure. When one host tries to communicate or send message to a host which is not adjacent to it, the data travels through all intermediate hosts. To connect one more host in the existing structure, the administrator may need only one more extra cable.