Write a program that creates a child process

Assignment Help Basic Computer Science
Reference no: EM131056674

Write a program that places itself under the SCHED_FIFO scheduling policy and then creates a child process. Both processes should execute a function that causes the process to consume a maximum of 3 seconds of CPU time. (This can be done by using a loop in which the times() system call is repeatedly called to determine the amount of CPU time so far consumed.) After each quarter of a second of consumed CPU time, the function should print a message that displays the process ID and the amount of CPU time so far consumed. After each second of consumed CPU time, the function should call sched_yield() to yield the CPU to the other process. (Alternatively, the processes could raise each other's scheduling priority using sched_setparam().) The program's output should demonstrate that the two processes alternately execute for 1 second of CPU time. (Note carefully the advice given in Section 35.3.2 about preventing a runaway realtime process from hogging the CPU.)

Reference no: EM131056674

Questions Cloud

What is the effective rate of interest : Koopman's Chickens, Inc. plans to borrow $300,000 from its bank for one year. The rate of interest is 10 percent, but a compensating balance of 15 percent is required. What is the effective rate of interest?
How films might be different were they made in another time : Plus, What influences from their time periods are present in the films? Consider how the films might be different were they made in another time and place. Why and how would they be different?
Estimate the outage rates : Power line outages. Seven power lines of different lengths had outages as shown below. The exposure of a line equals its length times the years observed. Assume that the number of outages has a Poisson distribution
Appreciated or devalued against the mark : Assume that a bank has assets located in London worth £150 million on which it earns an average of 8 percent per year. The bank has £100 million in liabilities on which it pays an average of 6 percent per year. The current spot exchange rate is £1..
Write a program that creates a child process : demonstrate that the two processes alternately execute for 1 second of CPU time. (Note carefully the advice given in Section 35.3.2 about preventing a runaway realtime process from hogging the CPU.)
Formula for the variance of the prediction error : Battery failures. In five years, 500.000 batteries were put into service at a uniform rate. In that period, 5000 of them failed and were promptly replaced
What is the expected return of asset : a. What is the expected return of each asset? b. What is the variance of each asset? c. What is the standard deviation of each asset?
Find out the firm d equity beta : The firm D wants to use the information available from its industry to determine its equity beta. Find out the firm D's equity beta. (Hint: use unlever and re-lever procedures)
Describe the possible migration of ancient peoples : Describing the possible migration of ancient peoples; The influence that trade, agriculture, and tools had on movements; and How colonial actions and colonization impacted those among whom the colonists settled.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain the caching of disk blocks

Explain the caching of disk blocks in terms of database recovery. Also explain what a transaction rollback is and a cascading rollback. Remember to give illustrated examples.

  Display the resulting answers to the screen

Read in the input text file, and interpret the input data as RPN. Each line in the file should be interpreted as its own math problem.

  Assignment regarding the public key infrastructure

You are the Information Security Officer at a small software company. The organization currently utilizes a Microsoft Server 2008 Active Directory domain administered by a limited number of over-tasked network administrators.

  Running total of the number of bugs collected

A bug collector collects bugs every day for seven days. Design a modularized program that keeps a running total of the number of bugs collected during the seven days. The loop should ask for the number of bugs collected for each day, and when the loo..

  Determine the horizontal force developed on the board

The clamp provides pressure from several directions on the edges of the board.

  Create a financial spreadsheet on a topic

Create a financial spreadsheet on a topic

  Security policy framework

You will create an organizational security plan policy using your assigned readings (pay close attention to Chapter 3 in the Building an Effective Information Security Policy) as well as the Cybersecurity Framework  as a resource, creating a two ..

  What is the project duration

Using any approach you wish (e.g., trial and error), develop a loading chart for resources, Electrical Engineers (EE), and resource, Mechanical Engineers (ME). Assume only one of each resource exists.

  Calculate each student average and grade for the class

Also print a report of the each student's test grades, average and final grade as a table, and then print the averages of each Test and overall Test Average, as well as highest Test Grade of all Tests and the student with the highest class grade.

  Describe why analyst needs to understand how people think

Describe why an analyst requires to understand how people think, how they learn, how they react to change, how they communicate, and how they work.

  Construct a 3-bit counter using three d flip-flops

Construct a 3-bit counter using three D flip-flops and a selection of gates. The inputs should consist of a signal that resets the counter to 0, called reset, and a signal to increment the counter, called inc.

  Construct a network diagram for the project

Construct a network diagram for the project. Calculate the scheduled completion time.

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