Use sysconf to determine the maximum number of standard io

Assignment Help C/C++ Programming
Reference no: EM131125495

Midterm Take-home Examine

Deliverables: Source code and output file
Note: Cheating will receive anF

1. Use sysconf to determine the maximum number of standard I/O streams a process can open at a time. Then try to open this number of streams. How many can you open? Does it match what sysconf reports?
Hint see chapter 2.5.4

2. File I/O programming 

2.1 Write a BASH script to create a random file, "random1", of 2MB 
Hint: 2MB is 512 bytes x 4000, use ‘dd' command

2.2 Use ‘read()' and ‘write()' functions to write a program called ‘copy1' that emulates ‘cp' command to create a copy. 
Example: copy1 random1 random2

2.3 Replace ‘read()', ‘write()‘ in 2.2 above with ‘fread()' and ‘fwrite()', called ‘copy2' 

2.4 Add a loop of 100 in ‘2.2' and ‘2.3', called n'copy3' and ‘copy4', that use time() function to compare which one runs faster. Use ‘fprintf()' to output the results to the screen, right aligned to 78th column 

I/O Mode: Buffered (or unbuffered)
File Size: 1,003,202 bytes
File Last Modified Time: 11/01/2014 01:02:33pm
Total Run Time: 4,323 seconds
Input File Name: random1

3. Write a C program, named ‘hex', to perform like ‘hexdump'

Reference no: EM131125495

Questions Cloud

Journalize the adjusting entry for uncollectible accounts : Using the data in Exercise 9-11, assume that the allowance for doubtful accounts for Fonda Bikes Co. had a debit balance of $4,145 as of December 31, 2010.
Manufacturer wants to maximize the profit of two products : A manufacturer wants to maximize the profit of two products. Product I fields a profit of $ 1.50 per unit, and product II yields a profit of 52.00 per unit. The production level of product I is less than or ethical to 600 units plus three times the p..
Define financial restructuring and describe what is meant : Define financial restructuring and describe what is meant by debt payments extension and debt composition change.
Estimate what the proper balance of the allowance : Estimate what the proper balance of the allowance for doubtful accounts should be as of December 31, 2010.
Use sysconf to determine the maximum number of standard io : 1. Use sysconf to determine the maximum number of standard I/O streams a process can open at a time. Then try to open this number of streams. How many can you open? Does it match what sysconf reports?
What was the major reason for the slave uprising : What was the major reason for the slave uprising? What were the slaves fighting for? How did most slaves fight? Were the uprisings successful?
Compare them with the industry average data : a. Calculate Jimenez's 2011 forecasted ratios, compare them with the industry average data, and comment briefly on Jimenez's projected strengths and weaknesses.
Journalize the adjusting entry for uncollectible accounts : Using data in Exercise 9-8, assume that the allowance for doubtful accounts for Summit Industries has a credit balance of $16,175 before adjustment on November 30.
Define asset restructuring and describe : Define asset restructuring and describe how it can be implemented to escape financial distress.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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