Path: utzoo!utgpu!attcan!uunet!ubvax!ames!lamaster From: lamaster@ames.arc.nasa.gov (Hugh LaMaster) Newsgroups: comp.arch Subject: Re: Cray & Amdahl Virtual memory debate Message-ID: <12407@ames.arc.nasa.gov> Date: 27 Jul 88 15:35:29 GMT References: <4232@cbmvax.UUCP> <76700035@p.cs.uiuc.edu> <34254@yale-celray.yale.UUCP> <851@l.cc.purdue.edu> Reply-To: lamaster@ames.arc.nasa.gov.UUCP (Hugh LaMaster) Organization: NASA Ames Research Center, Moffett Field, Calif. Lines: 40 In article <851@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: > >One of the examples given at the short course at Purdue on the CYBER 205 >was the problem of multiplying two 1024x1024 matrices. Because of the >fact that there is a paged virtual memory, it was necessary to use a very >peculiar way of arranging the matrix elements to avoid thrashing. On a >machine without virtual memory, assuming IO and computing can go on simul- >taneously, any competent programmer could arrange things so that, after "Virtual Memory" is red herring here. If there is not enough physical memory to hold the array, the same (re)structuring of data is necessary on either machine. How that restructured data is mapped to code is a matter of taste - some people prefer to rearrange arrays and do implicit I/O, others prefer to do explicit I/O and use EXACTLY the same code on both machines. There is at least one well known advantage for each case: 1) The implicit I/O solution allows the program to run with progressively less and less I/O as the amount of memory on the system is increased, with no reprogramming required. 2) The explicit I/O solution allows the program to run on a Cray (most other machines have virtual memory) without changing ANYTHING. I have seen it done both ways. Everyone recognizes that data has to reside in physical memory at the moment it is used. Nevertheless, there are many advantages to having "virtual memory" on a system, including many performance advantages. I will refrain from restating them again, but, suffice it to say that the only real disadvantage to virtual memory is the extra space in the CPU that the memory mapping hardware consumes. In my opinion, the many advantages are worth the price. -- Hugh LaMaster, m/s 233-9, UUCP ames!lamaster NASA Ames Research Center ARPA lamaster@ames.arc.nasa.gov Moffett Field, CA 94035 Phone: (415)694-6117