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

  Elements that must be included in a loop

What are the three elements that must be included in a loop in order for the loop to successfully perform correctly - What will happen if these statements are not included? Provide examples.

  Design a java software system that simulates

Design a java software system that simulates a calculator that performs at least the basic arithmetic operation and trigonometric functions. Your program must contain selection (if), repetition (loop) and functions, arrays and classes

  Create a c++ binary search tree

Create a C++ Binary Search Tree that will accept integers in this order: 35, 18, 48, 72, 60, 25. Ask user for input and search tree utilizing integer input. Return "True" if input integer is found or "False" if it is not found in tree.

  Write a recursive function that takes a string as parameter

Write a recursive function that takes a string as a parameter and prints its reversal in the same function in c++

  What is the maximum duration

A computer on a 10Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 2Mbps. It is initially filled to capacity with 16Megabits. What is the maximum duration for which the computer can transmit at the full 10Mbps?

  What happens throughout the eleven-day mourning

What happens throughout the eleven-day mourning period after Ashoke's death? How do friends express their sympathy? What kind of diet do Ashima, Gogol, and Sonia follow? What happens on the eleventh day itself?

  Type two numbers from range 20-60

Ask the user to type two numbers from range 20-60. Keep on asking until he types in the range of 20-60. Display the numbers between those two numbers in ascending order.

  Computes the measure of an object.

This program tests the measurement of rectangles by perimeter.

  Interface that manages scores from surfing contest

Create a program with a menu driven interface that manages the scores from a surfing contest. At start up, your program should read the attached file, pick the score out of each line and append it to a list of scores.

  Develop a program that calculates monthly payments for loan

Home Loan Amortization Develop and test a program that calculates the monthly payments for a loan amount and a term (number of years) input by the user.

  Write a for loop that adds the integers

Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result.

  Describe the probability of the moves

Write a program in C++ to describe the Probability of the moves

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