This repository contains my solutions to the labs projects of the Advance Computer Architecture(1DT024) course in Uppsala University.
The labs assignments and the bonus assignments have been separated on a different branch for grading purposes.
The first lab was simulating a cache using the Pin tool by Intel.
The first part of the assignment was to modify the design of the cache such that it could work as direct mapped cache and 2-way set-associative cache with a LRU replacement policy.
The second part of the assignment was to visualise the miss ratio between the two cache designs using the given radix
program.
The bonus part was to optimize the matrix multiplication taking advantage of the cache design. In this solution blocking has been used.
The first part of the assignent was implementing synchronization mechanisms using the synchronizations primitives.
The second part of the assignment was to implement the same synchronization using different types of locks.
The bonus part was to rewrite the atomic_counter_lock.cpp
using lockguards. Then to apply less restrictive memory models rather than sequential consistency
in order to achieve the same results without "slowing down" the program execution allowing the compiler to put less fences in the compiled program.
The last part was to implement the CLH lock.
In this lab assignment the requested task was to implement a multithread implementation of the Gauss-Seidel algorithm to solve a linear equation system.
The bonus part were theoretical questions about memory models.
This assignment was implementing an optimized version of three programs(text to lower case, matrix-vector multiplication, matrix-matrix multiplication) using vectorized instructions (SSE 4.1).
The bonus part was to implement a highly optimize version of the matrix-matrix multiplication using blocking and vectorized instructions.