How our version of xinu that runs on the virtual machine

Assignment Help Operating System
Reference no: EM132257812

Question 1:

In this question, you are required to simulate the starving problem that a process may suffer if all other processes in the system have higher priority than its priority.

It is required to create at least two processes (P1 and P2) with priorities 40 and 35 for example. You should create a third process (Pstav) with less priority such as 25.

You may need to put P1 and P2 in the sleep state every couple of seconds to simulate a context switch between P1 and P2. When P1 sleeps, P2 will run and when P2 sleeps, P1 will run. Until now, Pstarv will not be able to run since its priority is the lowest priority. You need to fix that. You are required to change/update/increase the priority of Pstarv each time a context switch occurs.

So, after a number of context switches, Pstarv will finally be able to run to print its ID and print a celebration message that it is finally running and celebrate that you will get a good grade as well.

Feel free to assume any missing information such as should you have a flag or an argument to decide which process you are interested to avoid starvation, should you use shell commands or not, should you increase the Pstarv priority by 1 or by 5........ etc. P1 and P2 should not know anything about the Pstarv process. Do not hardcode it inside P1 or P2. So, you should not include the code of increasing the Pstarv priority in P1 nor P2.

Question 2:

Xinu can work on the BBB hardware board or via the virtual machine. One of the main differences of the Xinu OS that is designed for the hardware is that it has a dedicated clock handler function (clkhandler.c). Our version of Xinuthat is designed for the virtual machine(VM) does not have this clock handler. Attached is the "clkhandler.c". Study the clkhandler.c file.

Explain how our version of xinu that runs on the virtual machine can achieve the functions in the clkhandler.c file.

Attached:clkhandler.c for the BBB, clkinit for the BBB, and the clkinit for the VM.

Write a program in Xinu to show that the clkhandler.c for the BBB and clkinit for the BBB can be replaced by only the clkinit for the VM.

You can think of the starvation problem but instead of incrementing the priority of the Pstarv every time a context switch occurs, the priority increment of Pstarv should occur every two seconds the Pstarv process is in the ready queue without getting the CPU while another CPU bound process should reduce its priority by dividing its priority by two each second. CPU bound process is the process that uses up its quantum completely. Whenever we find that we are at the end of a timeslice, we should set the cpu usage flag for the current process to CPU ALL to represent CPU bound process. By using this technique and after a few seconds, Pstarv priority will increase and other CPU bound processes priority will decrease to the point that Pstarv will be able to run.

Attachment:- operating systems.zip

Verified Expert

Starving process in operating system is very popular problem also known as the dining philosopher problem which states the level of philosophers which want to eat but they are stuck in deadlock condition which is solved here using c language.

Reference no: EM132257812

Questions Cloud

Explain benefits to nursing satisfaction : Explain 3 benefits to nursing satisfaction when utilizing the theory. Describe two barriers to using the theory in practice and at least one method.
What data can gather based on available client information : NURS340 Public Health As a public health nurse at a free clinic, you are assessing and interviewing a 21-year-old woman who has come to the clinic.
Create an er diagram using visio based on your analysis : Determine the relationships between the entities and find the one-to-many and many-to-many relationships.
Explain the rise of the progressive movement : Over the course of the nineteenth century, the United States matured into a country with interests and influences extending beyond North America.
How our version of xinu that runs on the virtual machine : CIS 657 - Principles of Operating Systems - Syracuse University - simulate the starving problem that a process may suffer if all other processes in the system
Distinguishing between basic and distinctive resources : Analyse and critically evaluate the impact that each of these drivers is having upon both the relevant industry sector and upon the selected company.
What questions should be asked about medications : A patient is admitted to your institution directly from her attending physician's office. The patient has been admitted to your institution before.
What are probiotics and live active cultures present in food : What are probiotics and are live active cultures present in foods the same thing? Are they helpful or threatening to clients with bowel disorder?
Discuss an open communication climate : Discuss at least three ways that you can empower an employee? Discuss an open communication climate and why it is important.

Reviews

len2257812

3/15/2019 10:08:59 PM

1. A video file for Question 1 explaining the code and showing the results. Do not include the make clean, make, ./upload.sh, sudo minicom, and opening the back end in your video to reduce the video file size. 2. A video file for Question 2 explaining the task you are doing, the code and showing the results. Do not include the make clean, make, ./upload.sh, sudo minicom, and opening the back end in your video to reduce the video file size. 3. A single pdf file that includes the following: 3.1 Codes of every file you edited highlighting in yellow the change for Question 1 and 2 3.2 Answer to Question 2 explaining how our version of xinu that runs on the virtual machine can achieve the functions in the clkhandler.c file. 4. The files that you changed/edited (such as .c and .h files) for both questions. 5. A tar file of xinu includes all files (changed or not changed) for both questions.

Write a Review

Operating System Questions & Answers

  Discuss the different dynamic storage allocation algorithms

Prepare a presentation where you discuss the different dynamic storage allocation algorithms, First-fit, Best-fit, and Worst-fit. Include the pros and cons of each algorithm?

  Mechanisms of protection and policies of protection

Why is it important to distinguish between mechanisms of protection and policies of protection and what is an access matrix, and how can it be implemented?

  Compare and contrast at least two operating systems

Compare and contrast at least two operating systems that are available today for use on personal computers and / or mobile devices. If you were considering the purchase of a new computing device.

  Programming language machine independence

Discuss and explain the main factors that influence programming language machine independence, and how higher levels of machine independence could be achieved.

  Describe the differences between symmetric and asymmetric

Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems?

  Discussion on good and bad website

Discover a good website and discuss what makes this site good in bulleted format and provide details for each item.

  Describe process management and memory management

Describe the process management and memory management activities performed by the Operating System?

  Multilevel feedback queues and fcfs

What (if any) relation holds between the following pairs of sets of algorithms (a) Priority and SJF (b) Multilevel feedback queues and FCFS

  Difference between a policy and a procedure

Write a 500+ word paper that answers and fully discusses the topic questions. What is the difference between a policy and a procedure?

  Describing the different types of operating systems

Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use our phone.

  Express the propagation delay, dprop, in terms of m and s

Does the browser request a non-persistent or a persistent connection?

  As computers have evolved the complexity of operating

write 400-600 words that respond to the following questions with your thoughts ideas and comments. this will be the

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd