(1) Synchronization Metaphor
Before we introduce the implementation of a synchronization construct, let’s see a metaphor. Suppose you and other students are working on a group project together and you would like to synchronize the process of your work. In fact, you may do the following things to celebrate with others,
Sometimes, you may find it is terrifying to celebrate with your groupmates if they don’t respond to your messages. …
(1) Many-Core Challenges
In this part, we are going to talk about implementing a multi-core system. When it comes to the situation that we have more than 1 core because we need to maintain coherence between more cores, the coherence traffic increases. Therefore, we will meet the following challenges,
(1) Consistency Vs. Coherence
Before we discuss consistency, let’s first differ it from coherence. What coherence does is that it defines the order of accesses observable by different threads to the same address. In order to make the data on the same address the same in all the caches containing the corresponding block and in the memory, we have to maintain cache coherence. To allow coherence, we have to allow cache-to-cache transfer between caches.
However, memory consistency defines the order of accesses to different addresses. If we have out-of-order reads and writes from different addresses, the reader…
(1) The Definition of Synchronizations
Because we can have multicores and multi-threads that are trying to work together in the same program, we will need synchronization. For example, let’s say we have two threads and what they are doing is counting the occurrences of different letters in an essay. The first thread is called thread A, which will be counting the first half of the document, and the second one is called B, which will count the second half.
1. Introduction to Cache Coherence
(1) Cache Incoherent Problem
Before we talk about cache coherence, let’s first see why do we need to have cache coherence. When we use the shared memory for multicores, we assume that we can always retrieve the latest value from the shared memory. However, this is not the case in reality because each core has its own cache. If one core writes to its cache, and the cache has not written to the shared memory, then other cores will grab the wrong data from the memory if they need this value. …
(1) Flynn’s Taxonomy of Parallel Machines
We can distinguish different types of parallel machines according to how many instruction streams they have and how many data streams these instructions operate on.
1. Introduction to Fault Tolerance
(1) The Definition of the Dependability
Dependability means the quality of a delivered service that justifies relying on the system to provide the service. So a dependable system is the one that provides the service in a way that makes us expect it to do provide the correct service.
(2) Two Kinds of Servies
The service we have talked about actually has two definitions.
We can also conclude that dependability is about…
(1) The Role of the Storage
The storage keeps all the files (i.e. programs, data, settings), virtual memory (because the physical memory is not enough to hold all the virtual memory).
(1) The Definition of Random Access Memory (RAM)
Random-access memory (RAM) simply refers to the fact that we can access any memory location by address without going through all the memory locations. The opposite definition is a sequential access tape, where we have to scan through the whole tape to get a memory location.
(2) Types of RAM
There are mainly two types of RAM,
There is a probability we don’t have the libcurl installed in our system. So before we use it, we have to install it first. We can use the following command to test if we have
libcurl library installed.
$ curl-config --libs
If the output is,
-bash: curl-config: command not found
This means that we must install it in the first place. We can install the curl library by,
$ sudo apt install libcurl4-nss-dev
Then we can test it again,
If we successfully installed the libcurl, we can get the following output,