Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework 1: Due: 1729/2019 at noon All Programs must compile with gcc/g++ and execute on the CSE machines! 1. Briefly describe the semantics of the

image text in transcribed

Homework 1: Due: 1729/2019 at noon All Programs must compile with gcc/g++ and execute on the CSE machines! 1. Briefly describe the semantics of the following Unix system calls a) b) fork); exit); getpid(); d)getppid); wait() execl ) Write a C program that uses each of the above system calls at least once. Show your program listing with comments and corresponding output. Make sure that your program compiles and executes without error 2. Consider the evolution of computers in general and the increase in processor speed in particular. Suppose we were to design a system with a processor that is clocked at 4GHz. Further let us suppose that signals in our system can propagate at 75% of the speed of light. Determine the maximum distance between the CPU and Memory (or Cache) if we want to access data within one processor cycle. To access data, a signal must be sent by the CPU to the memory unit and the data has to be returned How would the distance change for a system that is clocked at 12 GHz? Show how you derived your answer! 3. Write a small C program that copies data from a file A to a file B byte_by byte. For different file sizes MB - 128MB (doubling the file size in each step) record the time your program requires to complete the file copy when using readO and write) system calls. Generate a graph that depicts the program performance. Repeat this experiment, but instead of copying individual bytes, use larger size portions of the file that are copied in each read and write0 system call. For instance, you may choose to copy the file in chunks of 2, 4, 8, ..., 1024 byte units. Generate a performance graph and interpret your experimental results. What do you observe? Why do you think the system shows the observed behavior? For this program it is imperative that file A and file B are located on the local disk. On Linux, the ltmp directory is located on the local file system. More about this in class!! You must submit your program, the graphs of the corresponding experiments, and your analysis

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago