Reference no: EM131317908
Assessment Task:
This coursework will allow you to investigate some of the issues involved in writing threaded programs.
You are to write a series of simple programs in C/C++ that will run under Linux, to illustrate how multithreading may be used to partition a processing task. Designs should be presented and all code must be fully commented and handed in as part of the deliverable.
Consider a 2 D data array whose contents need to be processed.
The array consists of values representing the height of a terrain at that point.
Create two new arrays to hold the results of calculations.
Result array one is to hold the Euclidean distance between each point and the next point in the row.
Result array two is to hold the angle of the slope between the point and its neighbour in the row calculated using arcsin.
1. Set up the first array and write a sequential program that accesses the data array and populates the result arrays. Provide evidence that the calculations used are correct.
2. Create a second program that it is still sequential but accesses the data array by a series of calls to a single function. Each call to that function will process a number of rows of the array as defined by a parameter passed to the function.
3. Write a third version of the program that will allow the processing to be carried out in one or more threads. Each thread should access a different set of rows of the array as in 2. above so that locking etc. is not an issue. Your program must be able to run with different numbers of threads.
4. Investigate how you might obtain run time information for the implementations and report on run times of each of your implementations.
Experiment with your implementations on machines with different numbers of processors/cores and explain all results.
5. Write a conclusion to your investigations. This should include
• an overview of threads and processes
• expected gains in threading in a typical application
• expected link between numbers of cores/processes and performance
• narrative regarding your results and development include short discussion on how code would need to change if locking were required
6. You may need to do a short demonstration of your code in a lab session or at some mutually agreed time. This is a mandatory part of the assessment.
Submission Instructions
The report should be a single document, word processed in Word format, and it should present your findings clearly and concisely. Take care that code is neatly laid out in the report - correctly formatted and with all code in Courier New font.
You must submit only an electronic version of the coursework (via Blackboard) which may be submitted to a plagiarism detection system.
Explain what depreciation-cash flow-operating cash flow
: Explain what depreciation, cash flow, operating cash flow and NPV are and how they interact with business decisions. Explain why these financial concepts are important for you as an employee, owner, or investor.
|
Is the bank liable for the janitor''s negligence
: Is the bank liable for the janitor's negligence? (Be sure to go through all the elements.) Additionally, note that under the doctrine of respondeat superior the bank WILL be liable for any potential negligence of the janitor employee?
|
Construct a concluding statement to end the essay
: Write an introductory paragraph that provides a brief overview of the company featured in the video. Briefly describe the possessions of the organisation on the bases of its core values, technological intervention and innovation
|
What is the pretax cost of debt
: a. What is the pretax cost of debt? b. What is the aftertax cost of debt? c. Which is more relevant, the pretax or the aftertax cost of debt?
|
Create two new arrays to hold the results of calculations
: Create two new arrays to hold the results of calculations. Result array one is to hold the Euclidean distance between each point and the next point in the row.
|
Expected one-year rate during year 5
: Suppose the current rate on a 5-year Treasury is 4.5%, the current rate on a 4-year Treasury is 4.25%, and the one-year rate is 2.84%. Using the unbiased expectations theory, what is the expected one-year rate during year 5, E(5r1)?
|
Bond using the straight line method
: 1). Please record the journal entry for the timely interest payment of the bond using the straight line method that was made on June 30th. 2). Please record the journal entry for the timely interest payment of the bond using the straight line met..
|
Does lisa have a defense
: Lisa and Danny are neighbors that live on Guerrero Street. Fifteen years ago Lisa built a gazebo. She frequently used the gazebo, but she was not aware that actually the gazebo was on property belonging to Danny. A month after the gazebo was built..
|
What is the after-tax cost of debt
: Question 1. A firm is considering a $300,000 debt issue. Their corporate tax rate is 34%. This long-term issue will pay a coupon rate of 5.6%. What is the after-tax cost of this debt?
|