Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Operating System Expert

Learning Objectives

The learning objectives of this assignment are to apply the knowledge in the course including multi-processes programming, multithread programming, communication of processes and process synchronization to solve a complex problem which involves multiple sides working together. This assignment requires the design, development, testing, and debugging skills of C language.

Specifications

Four external processes will communicate temperatures to a central process, which in turn will reply with its own temperature and will indicate whether the entire system has stabilized. Each process will receive its initial temperature upon creation and will recalculate a new temperature according to two formulas:

new external temp = (10*myTemp + centralTemp) / 11;

new central temp = (centralTemp + 1000* temp sum of external processes) / (1000*number of external processes + 1);

Initially, each external process will send its temperature to the central process through mailbox. If all external temperatures are exactly the same as that of the central process, the system has stabilized. In this case, the central process will notify each external process that it is now finished (along with the central process itself), and each process will output the final stabilized temperature. If the system has not yet become stable, the central process will send its new temperature to each of the external processes through mailbox and await their replies.

The processes will continue to run until the temperature has stabilized. The C programs of the external and central are given in Appendix (note don't remove instruction usleep(100000) in all tasks in this assignment). Compile and run as follows

#./external 10 1 &
#./external 100 2 &
#./external 1000 3 &
#./external 10000 4 &
#./central 10 &

Task-1. Simple Extension

Write central8.c and external8.c to perform the same task as described by the specifications where 8 external processes are considered. Compile and run as follows:

#./external8 10 1 &
#./external8 100 2 &
#./external8 1000 3 &
#./external8 10000 4 &
#./external8 50 5 &
#./external8 500 6 &
#./external8 5000 7 &
#./external8 50000 8 &
#./central8 10&

Task-2. Serve Two Group

Now consider there are two groups of external processes where the first group has external process 1-4 and the second group has external process 5-8. Each group of external processes communicate with the central to perform the same task as described by the specifications. The central process is with a single thread of control. For the first and second group, the initial temperature in the central is 10 and 100 respectively. Write central44.c and external44.c. Compile and run as follows (record the central process running time):

#./external44 10 1 1200 &
#./external44 100 2 1200 &
#./external44 1000 3 1200 &
#./external44 10000 4 1200 &
#./external44 50 5 1300 &
#./external44 500 6 1300 &
#./external44 5000 7 1300 &
#./external44 50000 8 1300 &
#./central44 10 100 1200 1300 &

Task-3. Multithread Programming

Perform the same task as described in Task-2 but the central process is with two threads of control. Each thread is corresponding to one group of external processes. Write central442T.c and external442T.c. Compile and run as follows (record the central process running time):

#./external442T 10 1 &
#./external442T 100 2 &
#./external442T 1000 3 &
#./external442T 10000 4 &
#./external442T 50 5 &
#./external442T 500 6 &
#./external442T 5000 7 &
#./external442T 50000 8 &
#./central442T 10 100 1200 1300 &

Assignment Report

The report should include a cover page to indicate the course title, course code, semester information, assignment #, assignment total marks, your lab time, your lab assistant name, your name, your student identity. The body of the report includes

1. Introduction

It should include a brief introduction of the assignment, the brief description of the system, the summary of what you have done in this assignment and the most important experience/lessons learned.

2. Assignment Tasks

2.1. Task - 1

The summary of your solution (including what you have done in central and external); Self-reflection and/or lessons learned; Report the converged temperature; Report the execution time of central; Report the demonstration date.

2.2. Task - 2

The summary of your solution (including what you have done in central and external); Self-reflection and/or lessons learned; Report the converged temperature for two groups respectively; Report the execution time of central process; Report the demonstration date.

2.3. Task - 3

The summary of your solution (including what you have done in central and external); Self-reflection and/or lessons learned; Report the converged temperature for two groups respectively; Report the execution time of central process; Report the demonstration date.

3. Analysis

3.1. Multithread Efficiency

Compare and contrast task-2 and task-3 in terms of execution time of central process. Provide explanation to your observation.

3.2. Synchronization

Analyse whether task-3 requires semaphore for process synchronization or not in your code, and explain your decision.

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M91401817
  • Price:- $200

Priced at Now at $200, Verified Solution

Have any Question?


Related Questions in Operating System

Question what do you see as the major differences between

Question : What do you see as the major differences between UNIX/Linux and other operating systems, such as Windows and Mac OS X? The response must be typed, single spaced, must be in times new roman font (size 12) and m ...

Question note apa format 250 words and three reference

Question: Note: APA format 250 words and three reference without plagarism Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Briefly describe the following concepts and indicate how they are related in the context ...

Show all stepssuppose that the following processes arrive

Show all steps Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. in answering the questions, use non-preemptive scheduling and base all dec ...

Taskyour job in this assignment is to create two virtual

Task Your job in this assignment is to create two Virtual machines each running a different but the latest distribution of Linux e.g. Ubuntu Server and CentOS. Each of these VM's is to offer services to a user base. The ...

Assignment -building a multi-threaded web server using c

Assignment - Building a multi-threaded web server using C and p threads, following the model from the lecture. Your program will have one thread acting as a dispatcher thread, listening fornetwork connections with reques ...

Question research hex editors available for mac os and

Question : Research hex editors available for Mac OS and Linux. Based on the documentation, how easy would validating these tools be? Select at least two hex editors for each OS, and discuss what you would do to validate ...

Question description of lasa in this assignment you will

Question: Description of LASA: In this assignment, you will select a real-world operating system (can be for a PC, server, tablet, handheld, or embedded device). You will introduce the operating system and its components ...

Question you are a security administrator responsible for

Question: You are a security administrator responsible for providing secure configuration requirements for new laptop deployments. After reading Module 2 of Certified Secure Computer User v2exercises, apply the configura ...

Foundation of information technologyresearch types of

Foundation of Information Technology Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Expl ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As