PowerPoint Presentation

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

NAME : ANISH CLASS: CSIT ROLL NO : 20951A3306 TOPIC: COMPUTER MEMORY AND ARITHMETIC: A LOOK UNDER THE HOOD.

Scene 2 (14s)

INTRODUCTION we have many places in which we can store data. You might keep your identification and credit cards in your wallet, where you can get them quickly However, space is important so you cant keep important information there, instead you can carry some papers for work or school in a backpack or briefcase and store old papers in desk any papers you don’t think you’ll need but afraid to throw out might be stored in attic, basement or locker..

Scene 3 (51s)

We can think of your wallet, backpack, desk and attic as hierarchy of storage space. The small ones gives you fast access to data that you often need, the larger one gives you slower access but more space. For the same reasons, computes also have a hierarchy of storage units. Memory management systems try o store information that you will soon need in a unit that gives fast access. This means that large vectors and arrays are broken up and moved piece as needed. You can write a correct computer program without ever knowing about memory management, but attention to memory management allows you to consistently write program that don’t have excessive memory delays..

Scene 4 (1m 49s)

TOOLS. John hennessy and david patterson give a good, detailed description of memory hierarchies In matlab , the underlying matrix decomposition software is drawn from the lapack fortran suit. Its based on the set of basic linear algebra subroutines (BLAS), which are provided by hardware manufacturers to optimize operations such as Inner product saxpy matrix-matrix multiplication and so on the lapack routines implement stale algorithms and provide high performance on variety of hardware.

Scene 5 (2m 33s)

Memoryhierarchy. Old data Od data Od data Od data Od data Od data Cd data Old data At 12. i) y(14j (b).

Scene 6 (2m 42s)

Memory management: • The computer memory hierarchy includes registers, cache, main memory, and disk. Arithmetic and logical operations are performed on the contents of registers, and the other storage units act as temporary storage for data on its way to or from the registers. • It's as if whenever you need to change some data in your attic, you move it first to your desk, then your backpack, and then your wallet, make the correction, and then move it back through your wallet, backpack, and desk, finally storing it back in the attic..

Scene 7 (3m 33s)

• gives a small illustration of a memory hierarchy. We'll consider a one-level cache, although most machines have a hierarchy of cache units. see how information moves between main memory and cache. Suppose that m= 12B and n= 32, and suppose for ease of counting that the first element in each matrix and vector lies in the first element of some page of main memory. The matrix elements are stored in the order memory is loaded by block(also called a cache line); in this example, this means eight elements at a time. So in the saxpyimplementation, in which we successively add xj * A(:,j) to y, the computer first loads , 1) l)into one block of the cache, a second block (because it needs the value of and lets y(l),...,y(8)occupy a third block (see Figure 1 a). After x( I :8, l) is added into I :8),we then need A(9, l) 16, l) and This would fill five blocks of cache, though, and we only have four, so we have to write over an old block—after assuring that any updated values are changed in the main memory. In our case, the old y-block or A-block disappears from cache (see Figure lb). Moving five blocks from main memory lets us do 16 of our 128 * 32 multiplications..

Scene 8 (6m 18s)

• If we work in a high-performance "compiled" language such as Fortran or a C-variant, we can use our timings of code fragments to estimate the cache-miss penalty. In "interpreted" Matlab (or even compiled Matlab), overhead masks the penalty. Whenever we time a program, though, there are many sources of uncertainty: • • Other processes are running. Even if you're running on a laptop on which you're the only user, the operating system (Windows, Linux, and so on) still does many other tasks, such as refreshing the screen, updating the clockand tracking the curser. Most systems have two timers, one that gives the elapsed time (for example, tic, toc) and one that tries to capture the time used by this process alone (for example, cputime)..

Scene 9 (7m 25s)

• There is uncertainty in the timer, so the data you collect are noisy. Most timers give trash unless they're timing intervals that are at least a millisecond (in fact, they're much better at intervals near one second). Therefore, the loop you're timing should do as many operations as possible, but not so many that interruptions by other active processes contaminate the elapsed time. • The time for arithmetic operations often depends on the values of the operand. Dividingby a power of 2 is usually much faster than dividing by other numbers, for example, and adding zero is usually faster than other additions..

Scene 10 (8m 20s)

• The computer uses pipelining. This occurs on many levels, but the fundamental idea is that the execution of each instruction we give the computer is partially overlapped With other instructions, so it's difficult to assign a cost to a single instruction. • Compilers optimize our code. A compiler might recognize, for example, that z(i)isn't changed by our code fragment and thus will remove that statement from the loop. • Cache blocks might be prefetched. Programs often access data in order, so computers might predict that the next sequential memoryblock should be loaded into cache while you're operating on the current one..

Scene 11 (9m 15s)

THANK YOU.