index — client-server-shm @ main

preassignment for my bachelor-thesis

README.md (view raw)

 1# B.Sc. Thesis Binary Translation Programming Assignment
 2
 3## Installation
 4
 5You can compile both programs by executing:
 6```bash
 7$ make
 8```
 9You will get two binaries: *server* and *client*.
10
11## Usage
12
13### Server
14
151. Execute the server:
16```bash
17$ ./server <number-of-buckets>
18```
19
20### Client
21
222. Execute the client(s):
23```bash
24$ ./client
25```
26You interact with this program through text-based prompts.
27
28At 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.
29
30Depending on the operation, you can be asked to give a key and/or a value. 
31
32The hashtable is implemented with <int, int>, invalid arguments will be catched.
33
34## Assignment
35
36### General instructions
37
38- Languages: C/C++
39- Initiate a github repository for each task
40- Provide the code accompanied with a Makefile to compile it as well as instructions on how to run your applications
41
42### Server/client application
43
44Task description: Implement the following two programs:
45
46#### Server:
47
48- Initializes a hash table of given size (provided via the command line)
49- Supports the insertion of items in the hash table
50- Hash table collisions are resolved by maintaining a linked list for each bucket/entry in the hash table
51- Supports concurrent operations (multithreading) to perform insert, get and delete operations on the hash table
52- Use readers-writer lock to ensure safety of concurrent operations; try to optimize the granularity
53- Communicates with the client program using shared memory buffer (POSIX shm)
54
55#### Client:
56
57- Enqueues requests/operations (insert, read, delete) to the server (that will operate on the the hash table) via a shared memory buffer (POSIX shm)