ENGR9881作业代写、Monitoring留学生作业代做、代写C++实验作业、代做C++程序语言作业帮做Haskell程序|帮做C/C++编程

ENGR9881 Computer Networks GECN Workshop05: MonitoringDue: Friday, 14 May 2019Lab 5 is comprised of 4 tasks; Task 4 is worth 2 checkpoints, each other task is worth 1 checkpoint with,each checkpoint contributing 1% towards your topic grade. Following completion of the checkpoints, acopy of the source code and output for each task should be compiled into a single text file and uploaded tothe relevant submission box on FLO for moderation. Speak to your demonstrator if you are unsure how todo this.While discussion of programming tasks with fellow students in labs is welcome and encouraged, please bemindful of the Universitys Academic Integrity policy and refrain from simply copying another studentscode (even if they agree!). You will gain a much greater understanding of the material if you take the time towork through your own solutions, and you will be expected to be able to explain your code before beingawarded checkpoints. Remember, the demonstrators are there to help if you get stuck.ObjectivesUpon completing they lab, you should be able to: Profile C programs to explore run time information to observe the time that programs take to run Use optional debug statements to enable/disable debugging code Use system functions (stat) to access file metadata to observe the time and date fields that are used byfiles in the file systemLearning out comes; LO2: Demonstrate the design and implementation of simple process and network level programsVersion 1.3 Page 1 of 5 2019/Jan/10Talk 1Write 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 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 time4. Calculate and print the time taken in microseconds for each loop and entire programexecutionSee;man 2 gettimeofdayVersion 1.3 Page 2 of 5 2019/Jan/10Task 2Write a program that uses the function getopt() to parse command line options, print providedoptions.1. Call a function usage() if there are no command line arguments2. With in a suitable loop (refer to the getopt man page for example code1. Use getopt() to parse the command line options2. With in a switch/case statement1. Process arguments and print each option and argument2. In the switch control structure set the default case and ‘?’ to call usage() ifincorrect arguments are providedvoid usage () {printf(“Usage: programname -f filename”);}See;man 3 getoptVersion 1.3 Page 3 of 5 2019/Jan/10Task 3Write a program that uses stat() to collect the metadata about a file and print out each of thefields, display all the relevant time and/or date related fields.1. Use getopt() to provide a the command line argument of the file name2. Use the following C header file;#include 3. Use stat() and the structure in the stat man page to find the metadata about the provided file4. Print each of the time related elements of the structure with the appropriate format anddescription;struct stat {dev_t st_dev; /* device inode resides on */ino_t st_ino; /* inodes 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’ ”, file->st_dev);printf(“inode’s number: ‘%d’ ”, file->st_ino);printf(“inode’s number: ‘%d’ ”, file->st_ino);…6. How can the time stamp on files be used to determine performance and timing?See;man 2 statVersion 1.3 Page 4 of 5 2019/Jan/10Task 4Copy the source code for task 1 and add DEBUG statements around the timing functionality toallow optional use of timing. Part 11. add a #define statement at the top of your code for DEBUG 1 for true and DEBUG 0 forfalse2. Use an if statement to allow for conditional execution of the timing functionsif (DEBUG) {gettimeofday();}3. Collect run time information in the shell with the command time, for each of DEBUG 1and DEBUG 0? Part 24. add a #define statement at the top of your code for DEBUG5. Use an #ifdef and #endif statement to allow for conditional compilation and execution ofthe timing functions#ifdef DEBUGgettimeofday()#endif6. Collect run time information in the shell with the command time, for each of DEBUG 1and DEBUG 0 Part 37. 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?See;man 2 statVersion 1.3 Page 5 of 5 2019/Jan/10本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp QQ:99515681 或邮箱:[email protected] 微信:codehelp

你可能感兴趣的:(ENGR9881作业代写、Monitoring留学生作业代做、代写C++实验作业、代做C++程序语言作业帮做Haskell程序|帮做C/C++编程)