Experts in Written Essays & Research Papers: Assignment Help Services.

To hire a writers, fill the order instructions form & checkout—guaranteed a top college graduate to write your essay & NO AI-Plagiarism in the
final papers! Pursuing an 8-16 week course? The best in completing ace my homework & online class help, will assist you today!

Posted: May 24th, 2023

Process and thread project

Assessment Brief Project DescriptionYou will design and implement a keyword search server, that will take a single keyword and a directoryname from a client and will search the keyword in all the files sitting in a given directory usingmultiplethreads. You will also implement the client program. There may be several client processes requestingservice from the server process. The client processes and the server will communicate using messagequeues. The client program will be named as ks_client (keyword search client) and it will taketwo parameters:1. A keyword that is expressed as a single word, starting with a whitespace character and endingwith a whitespace character, not including any whitespace character in the middle. A whites-pace character is either a , , or character. There will be noempty word specified.2. A directory name (full path)Hence a client program can be invoked as follows:./ks_client keyword dirpathA client process that is invoked with those parameters will first attach to the server master messagequeue identified by a key derived from a file named by the given pathname and a nonzero integervalue. The server will use the master message queue to receive requests from the client processes.Since you are the programmer of both the client and the server, you will decide this pathname andthe integer parameters of ftok to uniquely identify a message queue. For instance, you can use thename of server program and the integer 1 in both client and server to create a key as follows:ftok("ks_server.c", 1)See the man page of the ftok for more details on obtaining a key. See also the msgget functionto learn how to get a message queue identifier using the key returned by the ftok function.After attaching the server master message, the client will generate a request message and includethe keyword and dirpath in that message. The generated message will be sent to the server via themaster message queue. The server must have created the master message queue earlier. Therefore,the server must be started earlier than the client.The name of the server program must be ks_server (keyword search server). It will take noparameters. As in the client case, a key will be used to create the server master message queue viathe msgget function. Parameters used in ftok function should be the same in both client and theserver to connect tp the same message queue. The server will be invoked as follows:./ks_serverand it will run silently in the background. The server process will not produce any output to thescreen. The output will go via message queues to the client processes. When the server process getsa request from a client process, it will create a child process that will handle the request. The requestis just a message that is received via a message queue. The request includes the keyword and the fullpath of the directory which includes multiple files to be searched. The child process that is createdwill handle the request. For every file in the directory, the child process will create a correspondingthread that will handle the search operation in that file.The thread will search the given keyword (i.e. will try to exactly match the entire word only) inthe file that it is assigned. While searching the file, if the thread encounters the keyword as an entireword in a line, then the thread will record the file name, line number, and the line itself (exluding thenewline character at the end) into a message. That message will be sent to the client process. If thekeyword is seen, for example, in 5 separate lines, then 5 separate messages will be created. Receivedmessages by the client will be printed to the screen in the following format:::For example, if the keyword is "a" and the content of the file to be searched (assume the file nameis file1.txt) is as follows:I raised my daughter in the Americanfashion; I gave her freedom, buttaught her never to dishonor herfamily. She found a boy friend,not an Italian. She went to themovies with him, stayed out late.Two months ago he took her for adrive, with another boy friend.They made her drink whiskey andthen they tried to take advantageof her. She resisted; she kept herhonor. So they beat her like ananimal. When I went to the hospitalher nose was broken, her jaw wasshattered and held together bywire, and she could not even weepbecause of the pain.Then, the client will print the following output to the screen:file1.txt:4:family. She found a boy friend,file1.txt:7:Two months ago he took her for aIf the keyword is seen more than once in a line, then a single message will be created for that line.For example, if we had a line as "a a a", then the number of matches on this line would be 3. However,we have to report such a line only once (i.e. generate a single message and print the line to the screenonly once).All threads that are searching a certain file existing in the given directory will do the same thing.Hence, they will return the result to the client process in messages via the message queue(s) that is(are) created between the server process and that client process for sending replies. The number ofmessage queues that you will create for this purpose is upto you.The client process will receive such messages. When the server finishes searching the whole tree,it will send a special message to the client indicating the end of the search operation. Similarly,a special keyword called exit will be used to shut-down the server. When server receives the exitkeyword, then it will not search that keyword but remove the master message queue and terminate.Similarly, the client will not wait output messages from the server if the exit keyword is sent to theserver.The user should be able to start up more than one client at the same time. In this way, severalsearch requests may arrive to the server at the same time and the server has to create several childprocesses in this case. Each child process will handle one client’s request. Handling a request maycause several threads to be created from that child process.Constants and TipsYou can make the following assumptions on the keyword size, directory path size, line size, and thefinal result size in terms of the number of characters they include:1. KEYWORDSIZE = 322. DIRPATHSIZE = 1283. LINESIZE = 10244. RESULTSIZE = 2048Also, remember to use thread-safe library functions inside your threads! (for instance strtok_r()instead of strtok()).What to Submit1. ks_client.c: including the source code of the client.2. ks_server.c: including the source code of the server.

How Are Writers Assigned to My Order?

We assign writers based on your topic, academic level, and specific needs, ensuring expertise and a perfect match for your project. Our system prioritizes the best fit for quality results. Our advanced matching algorithm considers both subject specialization and your assignment complexity. You can also browse profiles to choose your writer. Students seeking an essay writer benefit from our intelligent matching system that pairs expertise with requirements.

Order | Check Discount

Why trust us? Can you do my assignment?

College students want the best grades in their courses and that’s our FOCUS

Graduate Level Writers

Our team consists of outstanding writers who have specialized knowledge in specific subject areas and are scholars experienced in academic research;custom paper writing following assessment task, assignment brief and grading rubric criteria. They hold at least a graduate degree—230 with Masters and MSN qualifications, experts carefully selected and trained to ensure the best final paper quality of our work. .

College Students Prices

We’re dedicated to bringing on board top-notch writers who can provide excellent work at prices that make sense for college students; affordable papers for all the course subjects. Our goal? To give you the best bang for your buck without ever compromising on the quality of our essay writing services—or the content of your paper. We give special extra discounts for regular clients and also for long research papers, dissertations and capstone projects. #Don’t forget to use the DISCOUNT code in the COUPONS section of the order form before checking-out!.

100% Human Written

The Online Homework Ace Tutors service guarantees that our final work is 100% original, researched, and expertly human-written. Our professional academic writers craft every custom essay and research paper from scratch, ensuring your assignment is tailored to your exact instructions. We are committed to delivering plagiarism-free and AI-free work to each university/college student's 'write my paper' request. To uphold this promise, we check every draft for any possible instances of duplication, wrong citation, grammar errors, and artificiality before we send it to you. Thus, you can always rely on us to write genuine and high-standard content for your essay assignments.

How it works

When you trust to place an order with Sample Essays, here is what happens:

Complete the Order Form

Please fill out our order form completely, providing as much detail as possible in all the required fields.

Assignment of Writer

We carefully review your order and assign it to a skilled writer with the specific expertise needed to handle it. The writer then creates your content entirely from scratch.

Order in Progress and Submission

You, along with the support team and your assigned writer, communicate directly throughout the process. Once the final draft is delivered, you can either approve it or request edits, paraphrasing, or a complete revision.

Giving us Feedback(review our essay service)

Ultimately, we value your feedback on how your experience went. You can also explore testimonials from other clients. Additionally, you have the option to recommend or select your preferred writer for any future orders.

Write My Essay For Me