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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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