/word-frequency

Word frequency of a text file for UTP course IS924 Client-server architecture

Primary LanguageC++MIT LicenseMIT

Word frequency

Count the occurrences of each word in a text file concurrently (Partitioning the text and assigning each partition to a thread) using two approaches:

  • All threads use the same global hash table with concurrency control
  • All threads have a local hash table and we merge the results

Usage

To compile simply type in a terminal

  make

Then, to run each version

  • ./global-ht.out [options ...] file
  • ./local-ht.out [options ...] file

options can be

  • -j, --threads <value> Number of threads to use