COP 3767 - Operating Systems Professor: Michael Robinson e-mail : michael.robinson@fiu.edu program # 3e pgm3eCGS3767os This program is worth 10 points total. Partial credit will be given. 1 - Worth 4 points. Using your Windows or Linux virtual machine in terminal mode ONLY: Download the file located at: http://users.cis.fiu.edu/~mrobi002/databases/RAMerrors2 Each record in this file represents the location of an error found in RAM. Assume you have a computer with 8 gigs of RAM. Each gig in one RAM chip. One Gigabyte contains 1,073,741,824 (2^30) bytes ---------decimal------------- from byte to byte RAM chip 0 contain addresses: 0 1,073,741,823 RAM chip 1 contain addresses: 1,073,741,824 2,147,483,647 RAM chip 2 contain addresses: 2,147,483,648 3,221,225,471 RAM chip 3 contain addresses: 3,221,225,472 4,294,967,295 RAM chip 4 contain addresses: 4,294,967,296 5,368,709,119 RAM chip 5 contain addresses: 5,368,709,120 6,442,450,943 RAM chip 6 contain addresses: 6,442,450,944 7,516,192,767 RAM chip 7 contain addresses: 7,516,192,768 8,589,934,591 Create a Java program to do the following: - Open the text file you downloaded. - Read each record. - Print the RAM memory chip where each error is located as in the following example: (the data below is not part of this program, it is just an example) ErrorCode Binary Faulty at OnChip# ========= ============================================ =========== = ABCDEFABC 1010 1011 1100 1101 1110 1111 1010 1011 1100 46118402748 3 1A00D0000 0001 1010 0000 0000 1101 0000 0000 0000 0000 6980173824 0 7A0EDF301 0111 1010 0000 1110 1101 1111 0011 0000 0001 32764719873 2 3CDAEFFAD 0011 1100 1101 1010 1110 1111 1111 1010 1101 16335699885 1 2 - Worth 1.5 points. Using Linux Shell Scripting. - Implement division by 0, with error trapping, using if and while() commands, How: - Append your name, current date and time to a NEW file called results.txt - Use a while loop. - If the user enters the value -99 for the first or the second number, you must exit the while loop immediately. - Ask the user to enter the first number. - Ask the user to enter the second number. - If the second number is ZERO inform the user and ask for a correct second number. - If the second number is NOT a zero, do the division, display all numbers in this computation using labels, and add them to the results.txt file. 3 - Worth 1.5 points. Do the same as question 2 using Windows Batch. 4 - Worth 1.5 points. Linux Shell Scripting. How: - Use a for loop from 1 to 100. - Find the results of calculating each number from (1 to 100 mod 5) + 2. - After the for loop ends, display the average for all previous results and append them to the results.txt file. 5 - Worth 1.5 points. Do the same as question 4 using Windows Batch. Program submission ================== You need to submit: 1 LastNameFirstInitialpgm3.java ex: RobinsonMpgm3.java 1 LastNameFirstInitialpgm3.sh ex: RobinsonMpgm3.sh 1 LastNameFirstInitialpgm3.bat ex: RobinsonMpgm3.bat The Linux sh file will contain the divide by zero and the for loop parts The Windows bat file will contain the divide by zero and the for loop parts Make sure to rename the bat files to ba Zip all three files into one file and email it (the zip file). Do not forget to describe in your email's subject: Class Name, number or date-time, purpose ex: OS 3757-U1 pgm 3 or OS 2pm-3:15pm pgm 3 Your email "From " must have your name Print the programs that you emailed and turn them into class on the due date.