From 44e56d6b0accad40717fc359ee55b10b9c8d9024 Mon Sep 17 00:00:00 2001 From: ckrinitsin <101062646+ckrinitsin@users.noreply.github.com> Date: Fri, 21 Mar 2025 22:37:23 +0100 Subject: Update README.md --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 61d664f..6d41bc7 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,57 @@ -# BT-Programming-Assignment +# B.Sc. Thesis Binary Translation Programming Assignment -## General instructions +## Installation -Languages: C/C++ -Initiate a github repository for each task -Provide the code accompanied with a Makefile to compile it as well as instructions on how to run your applications +You can compile both programs by executing: +```bash +$ make +``` +You will get two binaries: *server* and *client*. -## Server/client application +## Usage + +### Server + +1. Execute the server: +```bash +$ ./server +``` + +### Client + +2. Execute the client: +```bash +$ ./client +``` +You interact with this program through text-based prompts. + +At first, you will be asked if you want to do an (i)nsert, a (g)et, a (r)emove or a (p)rint on the hashtable. + +Depending on the operation, you can be asked to give a key and/or a value. + +The hashtable is implemented with , invalid arguments will be catched. + +## Assignment + +### General instructions + +- Languages: C/C++ +- Initiate a github repository for each task +- Provide the code accompanied with a Makefile to compile it as well as instructions on how to run your applications + +### Server/client application Task description: Implement the following two programs: -Server: - Initializes a hash table of given size (provided via the command line) - Supports the insertion of items in the hash table - Hash table collisions are resolved by maintaining a linked list for each bucket/entry in the hash table - Supports concurrent operations (multithreading) to perform insert, get and delete operations on the hash table - Use readers-writer lock to ensure safety of concurrent operations; try to optimize the granularity - Communicates with the client program using shared memory buffer (POSIX shm) +#### Server: + +- Initializes a hash table of given size (provided via the command line) +- Supports the insertion of items in the hash table +- Hash table collisions are resolved by maintaining a linked list for each bucket/entry in the hash table +- Supports concurrent operations (multithreading) to perform insert, get and delete operations on the hash table +- Use readers-writer lock to ensure safety of concurrent operations; try to optimize the granularity +- Communicates with the client program using shared memory buffer (POSIX shm) + +#### Client: -Client: - Enqueues requests/operations (insert, read, delete) to the server (that will operate on the the hash table) via a shared memory buffer (POSIX shm) +- Enqueues requests/operations (insert, read, delete) to the server (that will operate on the the hash table) via a shared memory buffer (POSIX shm) -- cgit 1.4.1