ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 06 Jun 2017 My Price 9.00

CS351System Time Calculation

Week 7 Linux Assignment

 

Write a function that does some work (to put some load on the system) and make a note of the uptime and idletime before and after the call of the function.

 

Online CS351System Time CalculationObjectives of this Lab:The objective of this assignment is to get used to the system time information in Linux. Youwill do that by writing a small program (in either C, C++ or Java) that will access systemtime information available from the Linux /proc directory.How to proceed with the Program:1.Information in the /proc/uptime is available just as though the file were a regular textfile. You may open the file, read out the data, save or print that data, and then close thefile2.Type the program into an editor and compile the program at the command prompt.3.Compiling and execution is done as in Week 4 Linux project.4.If you do not find a description of some system call by themancommand, then try theWeb search enginegooglefor help (Use a Web browser to accesswww.google.com).Where to look for information in (/proc) directory ?File /proc/uptime has the information for this lab. You can refer to the online manual for moreinformation on proc (man proc). You can type the following in the command linemore /proc/uptimeto find the uptime of the system and the amount of time the system spending in the idleprocesses.Exercise : Write a program in C or C++ or Java to display the following information.1. Time information.In this section you will print out how long the system has been up and how busy it has been.Once you have some baseline numbers printed, you will run a short program that places a loadon the system. You will then take a second set of numbers and calculate the load that yourprogram placed on the system.a.Duration of uptime # get these information from /proc/uptimeb.Duration of idletimeCalculating load average.Write a function that does some work (to put some load on the system) and make a note of theuptime and idletime before and after the call of the function. The following can be usedas sample code for theworkfunction. This program simple runs a math calculation a largenumber of times, just trying to keep the CPU busy. You can include it as a function in youroverall program. Note that because you are using a math function (pow) you will need to

Attachments:

Answers

(11)
Status NEW Posted 06 Jun 2017 04:06 AM My Price 9.00

-----------

Attachments

file 1496722822-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)