Image for post
Image for post

Let’s recall the and the 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…


Image for post
Image for post

are events that are 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 depends on the specific configuration of the platform. So the and the type of devices can determine the signals.

Another important characteristic about interrupts is they appear . …


Image for post
Image for post

Supporting threads at the kernel level means that the . 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.

Supporting threads at the user level means that there is a that is linked with the application, and this library provides all of the management and runtime support for threads. …


Image for post
Image for post

The superscalar processor is a computer architecture where are loaded at once and, as far as possible, is executed simultaneously, shortening the time taken to run the whole program.

Unlike the out-of-order super processors, these processors do not try to identify ILP on their own. Even though a processor will also try to execute more than one instructions per cycle, the work is implemented in a different way.

  • Instructions Per Cycle

Both the out-of-order superscalar and…


Image for post
Image for post

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 can help.

() 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…


Image for post
Image for post

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,

  • by branch prediction
  • by register renaming
  • by Tomasulo’s algorithm
  • by reorder buffer (ROB)

This section discusses…


Image for post
Image for post

The present article does include anything related to the final submission () 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.

It has been a long time since we have done the…


Image for post
Image for post

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…


Image for post
Image for post

We can also open this file in an advanced way by the . 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 | +-----------+---------------------------+…

Adam Edelweiss

Knowledge is power, especially when it‘s shared. Articles @ https://medium.com/adamedelwiess/homepage/home

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store