Create a multi-threaded text file

Assignment Help C/C++ Programming
Reference no: EM132278226

Super Simple File Indexer

Create a multi-threaded text file indexing command line application that scans text files and counts the occurrences of all the words in them. At completion, print the top ten words encountered, and their counts. It should work as follows:

1. Accept as input a file path on the command line. Please name the executable ssfi. For example, we'd be able to run your application like this: ./ssfi /usr/share/doc

2. Have one thread that is responsible for searching the file path, including any subdirectories, for text files (ending in '.txt', case sensitive) Assume all files that end in ‘.txt' are ordinary ASCII files, and that the directory will contain no symbolic or hard links. Exclude files with subsequent extensions, for example ‘.txt.zip'.

3. When a text file is found, it should be handed off to a worker thread for processing, and the search thread should continue searching.

4. There should be a fixed number (N) of worker threads that handle text file processing. Please include a command line option ‘-t' to specify N. For example, to specify 3 worker threads, ./ssfi -t 3 /usr/share/doc

5. When a worker thread receives a text file to process, it opens the file and reads the contents to parse the words inside. Words are delimited by any character other than A- Z, a-z, or 0-9. Words should be matched case insensitive.

6. Once the file search is complete and all text files finish processing, the program prints out the top 10 words and their counts. Please output the top 10 list of words as separate lines containing the word, followed by a tab, followed by the count. For example:

oneword 1000
another 850
...

7. A Makefile should be provided to compile your program. Please, no Cmake, Scons, Ant, bjam, Shell scripts, etc. A simple Makefile is all that is needed.

8. Any libraries used like Boost, should be available to any modern Linux distribution. Fedora, Ubuntu, Gentoo, Arch, CentOS, etc.

Reference no: EM132278226

Questions Cloud

Explain the value of utilizing knowledge from professionals : Effective verbal, nonverbal, and media communication techniques to create opportunities for active inquiry, collaboration, and supportive interaction.
How many moles of sodium bicarbonate are contained : How many moles of NaHCO3 are contained in 10ml of 10% aqeous solution?
What gaps did you notice in the process : What gaps did you notice in the process? How can this be done on the whole classroom level?
How did you operationalize variables : What did you do explicitly? (How did you operationalize variables? How did you analyze your data?)
Create a multi-threaded text file : Create a multi-threaded text file indexing command line application that scans text files and counts the occurrences of all the words in them
What challenges do you face as security professionals : Vulnerabilities in the News It seems like every other day that there is a new major vulnerability in the news or another large company is compromised resulting
What is the confidence interval : Define null and alternate hypothesis. Identify the significance level, and check whether it is one sided or two sided test. What is the confidence interval
Explain reasoning for the evolution of health informatics : Write a paper in which you review how health informatics began, and how it has evolved over the years. Explain the reasoning for the evolution of health
Implement excess-3 to bcd converter : Implement excess-3 to Bcd converter using nand gates only

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program that will read in the number of two point baskets

Write a program that will read in the number of two point baskets and the number of three point baskets a player makes.

  Problem related to-the sieve of eratosthenes

Create an array with all elements initialized to 1 (true). Array elements with prime subscripts will remain 1. All other array elements will eventually.

  Explain use of access modifiers for methods and variables

Explain use of access modifiers (public, private, ...) for your methods and variables.

  Use a switch statement

Use a switch statement to write a program that prompts user to enter an character.

  Write a function which adds the two numbers

In C write a function which adds the two numbers. Test this function by calling from the main. In main, the user should be asked to provide the two numbers.

  Write a program that reads in a string of numbers

Write a program that: (1) Reads in a string of numbers (2) Loops through the digits in the string (3) For each digit in string print that many '+' on a line.

  Write a simple java program to calculate the sum of numbers

Write a simple java program to calculate the sum of two numbers.

  Problems of boolean algebra in computer organization.

It is an explanation for solving the problems of Boolean Algebra in Computer Organization.

  The limit on the amount of wage income

If the government raised the limit on the amount of wage income that is subject to the F.I.C.A. tax, this would: A. Move the Lorenz curve further from the line of income equality  B. Have no effect on the Lorenz curve

  One function shows the user how to use the program

Declare two functions One function shows the user how to use the program. Other function is use to calculate power and square root of variables.

  Program that converts from kilometers-to-miles

Write a program that prompts the user to select either Miles-to-Kilometers or Kilometers-to-Miles, then asks the user to enter the distance they wish to convert

  Create a website that would allow users to enter and submit

Create a Website that would allow users to enter and submit survey

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd