Scalability Basics To understand software performance and scalability
Scalability Basics To understand software performance and scalability issues on a multiprocessor, we have to have a rudimentary grasp of the underlying architecture. Since multiprocessors evolved out of uniprocessors, let’s step back and start with a quick overview of the uniprocessor computer architecture. The mainstream uniprocessor architecture consists of a single CPU and a single main memory module. Program data and instructions reside in main memory. Since CPU speed is at least an order of magnitude faster than memory, we also have an additional (very) fast memory inserted between the processor (= CPU) and main memory. This fast memory is also known as the cache. The cache provides faster access to program data and instructions. The cache may be split into two physical units, one for data and another for instructions. We’ll ignore that distinction and refer to it as a single logical entity. The processor needs at least one memory access per instruction in order to retrieve the instruction itself. On most instructions the processor may need additional memory references for data. When the processor needs memory access, it looks in the cache first. Since cache hit-ratios are upwards of 90 percent, slow trips to main memory are infrequent. This whole story is summarized in Figure 7.1. Figure 7.1. The Uniprocessor architecture An application is a single process or a set of cooperating processes. Each process consists of one or more threads. The scheduling entity on modern operating systems is a thread. The operating system does not execute a process, it executes a thread. Threads that are ready to execute are placed on the system’s run queue. The thread at the front of the queue is next in line for execution (Figure 7.2). Figure 7.2. Threads are the scheduling entities Page 146
Hint: This post is supported by Gama hrvatski web hosting services