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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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