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

  Networking and types of networking

This assignment explains the networking features, different kinds of networks and also how they are arranged.

  National and Global economic environment and ICICI Bank

While working in an economy, it has a separate identity but cannot operate insolently.

  Ssh or openssh server services

Write about SSH or OpenSSH server services discussion questions

  Network simulation

Network simulation on Hierarchical Network Rerouting against wormhole attacks

  Small internet works

Prepare a network simulation

  Solidify the concepts of client/server computing

One-way to solidify the concepts of client/server computing and interprocess communication is to develop the requirements for a computer game which plays "Rock, Paper, Scissors" using these techniques.

  Identify the various costs associated with the deployment

Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.

  Describe how the modern view of customer service

Describe how the greater reach of telecommunication networks today affects the security of resources which an organisation provides for its employees and customers.

  Technology in improving the relationship building process

Discuss the role of Technology in improving the relationship building process Do you think that the setting of a PR department may be helpful for the ISP provider? Why?

  Remote access networks and vpns

safekeeping posture of enterprise (venture) wired and wireless LANs (WLANs), steps listed in OWASP, Securing User Services, IPV4 ip address, IPV6 address format, V4 address, VPN, Deploying Voice over IP, Remote Management of Applications and Ser..

  Dns

problems of IPV, DNS server software, TCP SYN attack, Ping of Death, Land attack, Teardrop attack, Smurf attack, Fraggle attack

  Outline the difference between an intranet and an extranet

Outline the difference between an intranet and an extranet A programmer is trying to produce an applet with the display shown in Figure 1 below such that whenever one of the checkboxes is selected the label changes to indicate correctly what has..

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