ENGR9881 Computer Networks Assignment

Assignment Help Computer Networking
Reference no: EM132528298

ENGR9881 Computer Networks - Flinders University

Monitoring

Demonstrate the design and implementation of simple process and network level programs

Task 1 Write a program that calculates and prints the elapsed time of a loop to an accuracy of microseconds.

1. Use the structure timeval to store times form the following C header file;
#include <sys/time.h>

3. In a loop that executes 100 times
• Use gettimeofday() to get the time
• Iterate through a loop 1,000,000 times
• Use gettimeofday() to get the clasped time
4. Calculate and print the time taken in microseconds for each loop and entire program execution

Task 2

Write a program that uses the function getopt() to parse command line options, print provided options.

1. Call a function usage() if there are no command line arguments
2. With in a suitable loop (refer to the getopt man page for example code
1. Use getopt() to parse the command line options
2. With in a switch/case statement
1. Process arguments and print each option and argument
2. In the switch control structure set the default case and ‘?' to call usage() if incorrect arguments are provided

void usage () {
printf("Usage: programname -f filename");
}

Task 3

Write a program that uses stat() to collect the metadata about a file and print out each of the fields, display all the relevant time and/or date related fields.
1. Use getopt() to provide a the command line argument of the file name
2. Use the following C header file; #include <sys/stat.h>
3. Use stat() and the structure in the stat man page to find the metadata about the provided file
4. Print each of the time related elements of the structure with the appropriate format and description;

struct stat {
dev_t st_dev; /* device inode resides on */
ino_t st_ino; /* inode's number */
mode_t st_mode; /* inode protection mode */
...
}

5. Using the above comments in the structure in the man page;

printf("device inode resides on: ‘%d'\n", file->st_dev);

...
6. How can the time stamp on files be used to determine performance and timing?

Task 4

Copy the source code for Part 1 and add DEBUG statements around the timing functionality to allow optional use of timing.
• Part 1
1. add a #define statement at the top of your code for DEBUG 1 for true and DEBUG 0 for false
2. Use an if statement to allow for conditional execution of the timing functions

3. Collect run time information in the shell with the command time, for each of DEBUG 1 and DEBUG 0

• Part 2
4. add a #define statement at the top of your code for DEBUG
5. Use an #ifdef and #endif statement to allow for conditional compilation and execution of the timing functions

6. Collect run time information in the shell with the command time, for each of DEBUG 1 and DEBUG 0

• Part 3
7. Is it possible to measure any difference between using the techniques in part 1 and part 2?
8. Is it possible to measure the difference in execution time with the command line time?

Attachment:- Computer Networks.rar

Reference no: EM132528298

Questions Cloud

Estimate the terminal value : You have been asked to review the terminal value calculation in a valuation done by another analyst. The analyst has the following estimates for net income
Reviewing the valuation of henden corp : You are reviewing the valuation of Henden Corp, a small industrial manufacturing company. The analyst has estimated a value of ?800 million for the company
Potential to adversely affect assets : A threat is an event which has the potential to adversely affect assets.
Compute what is the net present value of the investment : What is the net present value of the investment, assuming the required rate of return is 6%? Would the company want to purchase the new machine?
ENGR9881 Computer Networks Assignment : ENGR9881 Computer Networks Assignment Help and Solution, Flinders University - Assessment Writing Service - Demonstrate the design and implementation
Calculate the liquidated value for hr debt collectors : Calculate the Liquidated Value for HR Debt Collectors Inc. The balance sheet shows the following:
Compute the standard deviation of kohl monthly returns : The past five monthly returns for Kohl's are 3.72%, 4.07%, -1.86%, 9.34%, and -2.74%. Compute the standard deviation of Kohl's monthly returns.
What exchange rate will the holder break even : A put option allows the holder to sell NOK250 000 at an exercise exchange rate of 0.190 (AUD/NOK). If the premium paid is 0.4 Australian cents per NOK
Calculate the free cash flow to the firm in 2019 : (1) Calculate the free cash flow to the firm in 2019, (2) the value of the firm at the end of 2019 and (3) the price per share.

Reviews

Write a Review

Computer Networking Questions & Answers

  What is the critical path and why is it so important

What is the critical path and why is it so important for project manager

  Critically reflect on current project management ethics

MN601 Network Project Management Assignment. MELBOURNE INSTITUTE OF TECHNOLOGY. Critically reflect on current project management ethics and research

  Create a program that estimates the radio signal strength

Create a program that estimates the radio signal strength (%) - a range - for computers stationed at different distances (ft) from the AP. In your design use 5 distance zones, and proportionally assign to them signal strength ranges (%).

  Simulate the network using netml

A satisfactory assignment document has been prepared; a network has been created and is depicted in a diagram in the assignment document and graphs which explain the behavior of the network in its original setup are presented including the throughp..

  How technology could be advance in the future

Networking and its implications are actively being reserached in Buisness Administration, Information Systems, and Distance Education, along with many other

  Research paper on home area networks

You need to rewrite a research paper on HOME AREA NETWORKS You need to analyses the security risks connected with the adoption of the HAN system

  What security concern exist for personal wireless networking

What security concerns exist for personal wireless networking? What security measures do you currently have in place? If you are not using wireless networking, list your reasons for not using the technology.

  Describe the osi and tcp/ip reference models.

Discuss how the layered stack approach assists in our understanding of these reference models.

  Open systems interconnection (osi) protocol mode

Describe the Open Systems Interconnection (OSI) protocol model.

  What are the benefits of a network in a business

What are the benefits of a network in a business? Provide an example from your experience, an interview, or an article that describes a network topology and how it supported the business .

  Encounter in your role as a systems analyst

Identify an ethical issue that you might encounter in your role as a systems analyst. Do not repeat an example from the textbook or one that has been

  Data model development and implementation

Determine the functional dependences - Outline all business rules that describe relationships between entities

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