Simulate the starving problem that a process may suffer

Assignment Help Operating System
Reference no: EM132253824

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.

Submission: PLEASE, READ CAREFULLY. Note: Any change in the submission format will cause deduction of points.

One single zipped (.zip) file that includes the following:

1. A video file for Question 1 explaining the code and showing the results. Do not include the make clean, make, ./upload.sh, sudominicom, 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, sudominicom, 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.

Attachment:- Final Exam.zip

Reference no: EM132253824

Questions Cloud

Why is the given effort necessary : Organizations are struggling to reduce and right-size their information foot-print, using data governance techniques like data cleansing and de-duplication.
How can sportsking adjust its compensation : How can Sportsking adjust its compensation packages to address these problems?
Determine an organization schema using given data : This is where you organize and list each applicable privacy policy statement. These are the rules that govern your company's actions, and those of your staff.
Create an Inverse Response Plot : Create an Inverse Response Plot. What transformation of PinchingForce provides the lowest residual sums of squares
Simulate the starving problem that a process may suffer : CIS 657 - Principles of Operating Systems - Syracuse University - Explain how our version of xinu that runs on the virtual machine can achieve the functions
What are three or four things that you would view : What are three or four things that you would view as demanding your quality control attention in your small business?
Preparing call reports on time : Other problems with Brad include not preparing call reports on time, failing to show up at trade shows, and not attending sales training programs.
Type of patient record keeping policies : What must be considered when developing policies and procedures?
Write a short report defining what the project is : Consider a project that might solve a problem. Write a short report defining what the project is and what the problem is that it is designed to solve.

Reviews

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