This is a multithreaded application that is capable of reading DNS hostnames from multiple files, and performing DNS resolution to IP addresses using a user provided number of threads. This was a project completed as part of my Operating Systems class. Check out the full code on my github:

https://github.com/raveenak96/multithreadedDNSLookup

This program is able to read a list of hostnames from provided input files, convert the hostnames to their IP address, and print these hostnames to an output file. This is done using multiple threads that form a thread pool used to parse the hostnames, and another thread pool to convert the hostnames and print them to an output file. The main program is contained in the file multilookup.c. Sample input files are provided in the input folder. To compile and run the program:

make
multi-lookup <# parsing threads> <# conversion threads> <parsing log> <output log> [ <inputfile>... ]

<# parsing threads> number of parser threads to place into the thread pool.
<# conversion threads> number of converter threads to place into the thread pool.
<parsing log> name of the file into which all the parser status information is written.
<output log> name of the file into which all the converter status information is written.
[ <inputfile>... ] list of filenames that are to be processed. Each file contains a list of domain names, one per line, that are to be resolved.

Example input file:

Example output file:

Below is a diagram of the flow of the application: