Image for post
Image for post
  1. Basis of Pipelining

There are several key concepts that are used in many ways in computer architecture. One of these concepts is called pipelining and it is used in several ways in pretty much every computer nowadays.

Pipelining is crucial to improving performance in processors; it increases throughput and reduces cycle time. The downside of pipelines is the increase in hazards for both controls and data.

(2) The Real Oil Pipeline

So how do pipelining works? Let’s think about the following metaphor. Suppose we want to transport oil between a filling station and an oil production plant and we have two methods to do that. …


Image for post
Image for post
  1. Vagrant Installation

2. Build the Top-level Directory

Now, let’s create a top-level directory that we plan to use for this series,

$ cd ~
$ mkdir CS6200
$ cd CS6200
$ mkdir pr1
$ mkdir pr3
$ mkdir pr4
$ curl https://gist.githubusercontent.com/Sadamingh/4866874eb05cf1ae92de6d8ada756a26/raw/1258f3ba822d382c42096e65e33c40702a369c56/Vagrantfile > Vagrantfile

From the directory with a Vagrantfile , we can use,

$ vagrant…


Image for post
Image for post
  1. Set Up the Virtual Machine

In this section, we would like to set up the experiment environment by the virtual machine. To continue, let’s download and install the Oracle VM VirtualBox 6.1 (if there’s a new version, download the new one) from this link (for Mac OS). Then, this should be installed as the VirtualBox application.


Image for post
Image for post

In China, it can be quite slow when we do,

$ sudo apt-get update

Step 1. Open the sources.list file

$ sudo gedit /etc/apt/sources.list
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ …

Image for post
Image for post
  1. Introduction to Operating System

In simplest terms, an operating system is a piece of software abstract and arbitrates the underlying hardware system. In this context, abstract means to simplify what the hardware actually looks like, and arbitrates means to manage and oversee the controlling of the hardware.

Note that the cache memory is not managed by the operating system. Instead, it is managed by the hardware.

(2) Three Functions of Operating System

  • Direct operational resources: means to control the use of CPU, memory, peripheral devices and allocate resources to different applications
  • Enforces working policies: means to have fair resource access, and impose certain limits to allocate the maximum amount of a certain resource that a particular application or process can use. For example, the limits like the number of opening files that can be opened per process or some thresholds that need to be passed in order for some memory management daemons to kick in. …

Image for post
Image for post
  1. Performance Measurements

Usually, we say performance, we mean the “processor speed”. But even then, there are really two aspects of performance that are not necessarily identical. One is called latency, the other is called throughput.

  • Latency: How long does a thing take from when we start something until it’s done.
  • Throughput: How many things can we do per second.

(2) The Relationship Between Latency and Throughput

Some may think that the value of the throughput is actually 1 over latency, which is,


Image for post
Image for post
  1. Basic Definitions

The concept of architecture means to design a building that is well-suited for its purpose.

(2) The Definition of Computer Architecture

The concept of computer architecture means to design a computer that is well-suited for its purpose.

(3) Goals of Computer Architecture

  • Improve performance: speed, battery lifetime, size, weight, energy, efficiency.
  • Improve abilities: 3D Graphics, debugging support, security

If we design computer architecture with the current technology then it will turn out to be an obsolete computer. …


Image for post
Image for post
  1. The basic C++ Program
// A basic C++ Program#include <iostream>
using namespace std;
int main() {
cout << "Hello World!";
}
  • Line 1: the double slashes // are used to denote this line as a comment.
  • Line 3: the # symbol means this line is a preprocessor directive. The preprocessors are the directives, which give instructions to the compiler to preprocess the information before the actual compilation starts. Preprocessor directives are not C++ statements, so they do not end in a semicolon ;. This command requests the standard IO header file iostream be included.
  • Line 4: this line means that we are using the standard library, which means that std::cout is equivalent to cout . …

Image for post
Image for post

A reduced instruction set computer, or RISC, is a computer with a small, highly optimized set of instructions. Microprocessor without Interlocked Pipelined Stages (MIPS) is a special kind of RISC architecture. The instruction set of the MIPS64 can be found here.

  1. Basic Calculation
  • Add with overflow the values in the register R2 and R3 and put the result in register R1,
ADD R1, R2, R3
ADD R1 = R2 + R3
  • Subtract with overflow the values in registers R1 and R5 and put the result in register R4,
SUB R1, R4, R5
  • Multiply the values in registers R8 and R9 and put the result in register…

Image for post
Image for post

In this experiment, we are going to create a 4-digit clock with the time.c module and the gpio.c model. This clock should have the following features.

  • Initially, the clock should display ---- until the button is pressed.
  • When the button is pressed after ----, the clock should count the loop from 0000 to 9999 .
  • Each increment of the number displayed equally takes one second. That’s the reason why we call it a clock instead of a counter.
  • When the button is pressed when the value is increasing, the number will be cleared to 0000 and it should display ---- . …

About

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