Let’s recall the boss-worker model and the pipeline model for multithreading systems. Suppose we have 11 tasks and 6 working threads for each model. A worker in the boss-worker model takes 120ms to complete a task, while each stage in the pipeline mode takes 20ms.
Let’s compare the performance of these two models.
For the boss-worker model, we have 1 boss thread and 5 worker threads. In order to handle these 11 tasks, we need at least ([11/5]+1) * 120 = 360ms
.
For the pipeline model, because we have to fill the pipeline…
(1) The Definition of the Interrupts
Interrupts are events that are generated externally to the CPU by components that are other than the CPU where the interrupt is delivered (i.e. I/O devices (i.e. network packet arrivals), timers (i.e. for time out), other CPUs (i.e. for context switch), etc.).
Particular interrupts can occur on a given platform depends on the specific configuration of the platform. So the hardware architecture and the type of devices can determine the signals.
Another important characteristic about interrupts is they appear asynchronously. …
(1) Kernel-Level Threads
Supporting threads at the kernel level means that the OS kernel itself is multithreaded. To do this, the OS kernel maintains some abstraction, for our threads data structure to represent threads, and it performs all of the operations like synchronization, scheduling, etc.
(2) User-Level Threads
Supporting threads at the user level means that there is a user-level library that is linked with the application, and this library provides all of the management and runtime support for threads. …
(1) Recall: Superscalar Processor
The superscalar processor is a computer architecture where more than one instructions are loaded at once and, as far as possible, is executed simultaneously, shortening the time taken to run the whole program.
(2) VLIW Processor
Unlike the out-of-order super processors, these processors do not try to identify ILP on their own. Even though a very long instruction word (VLIW) processor will also try to execute more than one instructions per cycle, the work is implemented in a different way.
(3) Superscalar Processor Vs. VLIW Processor
Both the out-of-order superscalar and…
We have completed the discussion that if we want to improve the IPC, we have to implement the out-of-order execution for the load/store instructions and non-load/store instructions. And in order to deal with the exceptions, we developed the ROB. However, to implement more than one instruction per cycle, we will discuss how the compiler can help.
2. Compiler For ILP
(1) The Definition of Instruction-level Parallelism (ILP)
Instruction-level Parallelism (ILP) is a family of processor and compiler design techniques that speed up execution by causing individual machine operations, such as memory loads and stores, integer additions, and floating-point multiplications…
We have seen that using the ROB and Tomasulo's Algorithm, we can enforce the order of dependencies on registers between the instructions. The remaining question is that how we can conduct the memory access ordering.
Commonly, in the program, we have lots of load/store instructions. So our question is, should these instructions be done in the programming order or should they be reordered too. So far, we have eliminated,
This section discusses…
NOTE: The present article does NOT include anything related to the final submission (no answers, no specific values, no results) for the course CS6290 HPCA because of the honor code. Most of the contents in this article is repeating the basic instructions and the directions of the Project 1. More Linux commands are provided as complements to the project’s guidelines.
Please feel free to contact me if this article violates the rules of Georgia Tech and I will immediately delete this article with no doubt.
(1) Recall Simulation
It has been a long time since we have done the…
(1) Function Pointer
Sometimes we may want a pointer pointing to a function. For example, suppose we a function int add(int a, int b)
that will return the value of a + b
. We have known that the add
variable is actually the pointer value of this function, so we may simply have the idea that we can build an integer pointer to store this function. For instance,
int *p = add;
Regardless of the warning of this line, this assigned statement can work for us and we will actually get a pointer pointing to the address…
(1) Open A File by fopen
We can also open this file in an advanced way by the file pointer. C language uses the file pointer for file operations. We can define a file pointer fp
by,
FILE *fp;
Then, to open a given file, we should use the fopen
function. Note that we should specify the file mode at the moment we open this file. The file can be load as only read, only write, only append, or combinations between these modes. We can refer to the following common modes,
+-----------+---------------------------+ | Mode | Meaning | +-----------+---------------------------+…
Knowledge is power, especially when it‘s shared. Articles @ https://medium.com/adamedelwiess/homepage/home