48450: Real Time Operating Systems - IT/Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task:

1. Introduction 

This assignment will involve the development of some application programs with real time file reading and writing. You are required to create a program that applies several key concepts of 48450 (RTOS) subject. A submission will be marked based on its merits and may be awarded a mark that is less than the total mark 30, if it's of modest quality. 

2. Assignment details 

Topic: Pipe, Threads and Semaphore for Real Time File Reading/Writing

The program implementation will involve using the concept of threads and pipes. Your program is required to create three threads (A, B and C) for reading data from one file and writing the data to another file through the pipe-line concept. This is similar to an internet file transmission. 

Your program is required to achieve the following operation goals: 

1. Thread A writes one line of data from a given “data.txt” file to a pipe. Note: The “data.txt” text file contains two parts, the file header region and the content region. Each region is written with several lines. 2. Thread B reads data from the pipe and rely the data to thread C 3. Thread C reads the data (line by line) from Thread B and detects whether the line of data is from the file header region (see Figure 1). This assignment requires to write the data from the content region of “data.txt” into the “output.txt” only. Therefore, if the line of data is from the file header, it will be discarded. 

The three threads (A, B, C) run sequentially (only one thread runs at a time while other two threads are blocked) and iteratively (process one line of data per each loop). When Thread A reaches to the end of the “data.txt” file, your program needs to handle and complete the Threads B and C to finish the A-B-C sequential loop. 

Your program is required to include pipe, thread and semaphore whereby necessary. Please note: The three threads A, B and C must adopt a mutually exclusive strategy to achieve your program. Again, only the content region of data as shown in Figure 1 is written into the “output.txt” through the program. It is also required to use a ‘struct’ to pass the parameters to the threads. The “data.txt” file can be downloaded from UTSOnline. 

You are required to do an experiment: If you do not apply semaphore, what will be the results by only using the three threads and the pipe? You are required to summarise your analysis and observation in your assignment report.

This IT/Computer Science Assignment has been solved by our IT/Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.