Completed

Semaphores and Message Passing (Project-03: Operating Systems)

Purpose of Project:

The goal of this project is to become familiar with semaphores in Unix / Linux operating system. You are working on the same problem as the last project (Project-02) but using semaphores to solve it.

Task:

As Kim knew from her English courses, palindromes are phrases that read the same way right-to-left as they do left-to-right, when disregarding capitalization. Being the nerd, she is, she likened that to her hobby of looking for palindromes on her vehicle odometer: 245542 (her old car), or 002200 (her new car). Now, in her first job after completing her undergraduate program in Computer Science, Kim is once again working with Palindromes. As part of her work, she is exploring alternative security encoding algorithms based on the premise that the encoding strings are not palindromes. Her first task is to examine a large set of strings to identify those that are palindromes, so that they may be deleted from the list of potential encoding strings. The strings consist of letters, (a, . . ., z, A, . . . Z), and numbers (0, . . ., 9). Ignore any punctuations and spaces. Kim has a one-dimensional array of pointers, mylist [ ], in which each element points to the start of a string (You can use string class of C++ if you so desire, but I think it will be easier to use C strings for this project). Each string terminates with the NULL character. Kim’s program is to examine each string and print out all strings that are palindromes in one file while the non-palindromes are written to another file.

Your job is obviously to write the code for Kim. The main program will read the list of palindromes from a file (one string per line) into shared memory and fork off processes. Each child will test the string at the index assigned to it and write the string into appropriate file, named [login to view URL] and nopalin.out. In addition, the processes will write into a log file (described below). You will have to use semaphores to protect the critical resources – the two files.

Skills: C Programming, Software Testing, Linux, UNIX, C++ Programming

See more: want project computer operating systems, message scroll project, satellite receivers operating systems, types of semaphores, semaphore in os, semaphore wait and signal, counting semaphore in os, semaphore vs mutex, binary semaphore, semaphore example, semaphore computer science, operating systems logos web, research information types computer operating systems, modern operating systems written java visual basic html, design operating systems vista, coffee shop operating systems, thank message completion project, atlantica supported operating systems, jubuntu operating systems, led matrix message board project

About the Employer:
( 2 reviews ) St. Louis, United States

Project ID: #27613368

Awarded to:

(54 Reviews)
5.6

2 freelancers are bidding on average $63 for this job

dastathagata

I have more than 17 years of experience in embedded and networking domain including programming like semaphore, mutex etc in Linux. I would like to discuss with you

$100 USD in 3 days
(18 Reviews)
4.7