Skip to content

Commit 31775c0

Browse files
authored
Update README.md
Revise README.md
1 parent 86cba39 commit 31775c0

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
## Description
66

7-
This program aims to **decrypt large numbers of encrypted tweets**. To **take advantages of multiple machines**, it uses a distributed system with *client-server* architecture. Server will assign tasks to the clients and store messages to the log file; client will decrypt each task assigned and send result message back. To **take advantages of multiple CPU cores**, each client uses fork function to spread the decryption tasks across multiple processes and uses pipes to communicate between the parent and child processes using "first come first serve" scheduling algorithm.
7+
This program aims to **decrypt large numbers of encrypted tweets**. The program uses a distributed system with *client-server* architecture to **take advantages of multiple machines**. The server assigns tasks to the clients and stores messages in the log file. The client decrypts each task assigned and sends the result message back to the server. The program **takes advantages of multiple CPU cores** by allowing each client to use the fork function to allocate the decryption tasks across multiple processes and pipes to communicate between the parent and child processes with "first come first serve" scheduling algorithm.
88

9-
Same as before, each tweet’s decryption follows four steps:
9+
Each tweet’s decryption follows four steps:
1010

1111
1. Remove unnecessary characters in a regular interval.
1212

@@ -20,26 +20,26 @@ Same as before, each tweet’s decryption follows four steps:
2020

2121
## Project Structure
2222

23-
* **"lyrebird.server.c"** : contains the main loop function for the server side which :
24-
1. regularly accept new clients and assign tasks to them;
25-
2. keep receiving messages from clients and write them to the log file;
26-
3. wait for all clients finish their tasks;
23+
* **"lyrebird.server.c"** : contains the main loop function for the server side:
24+
1. accept new clients regularly and assign tasks to them;
25+
2. continuously receive messages from clients and write them to the log file;
26+
3. wait for all clients to finish their tasks;
2727
4. exit.
28-
* **"lyrebird.client.c"** : contains the main loop function for the client side which :
28+
* **"lyrebird.client.c"** : contains the main loop function for the client side:
2929
1. use fork function to create child processes to decrypt each tweet file;
30-
2. keep communicating with the server side.
31-
* **"svr_func.c"** : contains many functions that used in the server side
32-
* **"cli_func.c"** : contains many functions that used in the client side
33-
* **"scheduling.c"** : contains one function, which is 'fcfs' scheduling algorithm that is used to assign tasks to the child processes in the parent process.
34-
* **"decrypt.c"** : contains a decryption function, which goes through 4 steps. In each step it calls some functions in dec_func.c to handle decryption.
35-
* **"dec_func.c"** : contains many functions that are used to decrypt the tweets, like removing extra characters, transforming between characters and integers.
36-
* **"line_io.c"** : contains two functions, which input one line data from file and output one line data to file
37-
* **"memwatch.c"** : mainly used for un-freed memory detection, overflow and underflow to memory buffers.
30+
2. continuously communicates with the server side.
31+
* **"svr_func.c"** : contains server side functions
32+
* **"cli_func.c"** : contains client side functions
33+
* **"scheduling.c"** : contains a single 'fcfs' scheduling algorithm for assigning tasks to the child processes in the parent process.
34+
* **"decrypt.c"** : contains a decryption function of 4 steps. In each step, the decryption function calls functions in dec_func.c to handle decryption.
35+
* **"dec_func.c"** : contains functions for decrypting the tweets, such as removing extra characters,and transforming between characters and integers.
36+
* **"line_io.c"** : contains two functions for input/output one line of data from/to files
37+
* **"memwatch.c"** : mainly for un-freed memory detection, overflow and underflow to memory buffers.
3838

3939
## How to Use
4040

4141
1. Unzip all the files into one folder and cd into it.
42-
2. Run command `make`, having all the source file compiled and linked.
42+
2. Run command `make` to link and compile the source files.
4343
3. Run command `./lyrebird.server <config_file> <log_file>` to set up a server.
4444
* (e.g. "./lyrebird.server config_file.txt log_file.txt")
4545
4. Run command `./lyrebird.client <ip address> <port number>` to set up a client and connect it to the server (multiple clients supported).
@@ -52,7 +52,7 @@ Same as before, each tweet’s decryption follows four steps:
5252
* Check the existence of input and output file.
5353
* Dynamically manage memory and gaurantee to free all when program finishs (also check any failure of malloc function).
5454
* Check IP address and port number.
55-
* Parent process does not exit until all the child processes finish.
55+
* Parent process does not exit until all the child processes terminate.
5656
* Server does not exit until all the clients quit.
5757
* Close all unnecessary pipes in each process.
5858
* Test empty data and largest data.

0 commit comments

Comments
 (0)