program # 2 OSpgm2_4Fall2021 CGS3767 Operating Systems for IT Professor: Michael Robinson e-mail : michael.robinson@cs.fiu.edu ****************************************************************************** * !!!!*** USE THE TOOLS THAT WE HAVE LEARNED IN OUR CLASS ONLY ***!!!! * ****************************************************************************** This assignment is worth 10 points total, partial credit will be given, In your Ubuntu VM (virtual machine), using terminal mode ONLY, do the following: DO NOT USE WINDOWS, MAC OR ANY OTHER OS TO DO THIS PROGRAM 1) Login, and in your CURRENT folder, create a folder named pgm2 2) In terminal mode, using the wget command, download your RAMerrors8x4f.5 file, located at http://users.cis.fiu.edu/~mrobi002/databases/RAMerrors8x4f.5 into your pgm2 folder. *** DO NOT CHANGE THE FILE NAME OR THE LOCATION OF THIS FILE OR PROGRAM *** Each record in this file represents the location of an error found in RAM 3) Assume you have a computer with 32 gigs of RAM, each 4 gigs in a different memory chip, therefore you have 8 (eight) 4 gigs RAM chips. The following are the memory locations for each one of the 8 (eight) RAM chips ---------- decimal address ---------- Total GIGs RAM chip 0 contain addresses: 0 - 34,359,738,368 bits = 4 RAM chip 1 contain addresses: 34,359,738,369 - 68,719,476,738 bits = 8 RAM chip 2 contain addresses: 68,719,476,739 - 103,079,215,108 bits = 12 RAM chip 3 contain addresses:103,079,215,109 - 137,438,953,478 bits = 16 RAM chip 4 contain addresses:137,438,953,479 - 171,798,691,848 bits = 20 RAM chip 5 contain addresses:171,798,691,849 - 206,158,430,218 bits = 24 RAM chip 6 contain addresses:206,158,430,219 - 240,518,168,588 bits = 28 RAM chip 7 contain addresses:240,518,168,589 - 274,877,906,958 bits = 32 I used this link to do the calculations: http://www.matisse.net/bitcalc/?input_amount=274%2C877%2C906%2C958&input_units=bits¬ation=legacy 4) In the same folder (pgm2), IN TERMINAL MODE, using any linux editor, create a Java program named: your lastName, First letter of your first name, _OS, pgm2, java example: robinsonM_OSpgm2.java **************************************************************************** * MAKE SURE THAT YOUR: * * java program 2 and the RAMerrors8x4f.5 file are in THE SAME pgm2 FOLDER * **************************************************************************** 5) Your Java program, in the following sequence, will do the following: a) Open the text file ( named on question 2 above ) USING any Java file commands learned in cop2250 or the Computer Science equivalent class. b) Read each record, which is the location of an error in RAM, in hex c) Convert that hex value to binary, in a separate method. d) Convert the binary value to its decimal value, in a separate method. e) In a separate method, using System.out.printf, display all the previous information and the RAM chip number where the error is located, for each record, as follows: Hex Error Binary Decimal Found at hex number = binary number = decimal number = chip number hex number = binary number = decimal number = chip number hex number = binary number = decimal number = chip number hex number = binary number = decimal number = chip number hex number = binary number = decimal number = chip number hex number = binary number = decimal number = chip number hex number = binary number = decimal number = chip number hex number = binary number = decimal number = chip number note: Location addresses for RAM chips are decimal *** YOU MUST FOLLOW MY JAVA RULES AT: https://users.cs.fiu.edu/~mrobi002/includes/JAVA_programmingRules *** DO NOT CHANGE THE FILE NAME download the file using the wget command *** MAKE SURE THE FILE IS IN THE SAME FOLDER AS YOUR JAVA PROGRAM *** CREATE YOUR OWN METHODS THAT WILL CONVERT HEX TO BINARY AND BINARY TO DECIMAL *** DO NOT USE JAVA'S AUTOMATIC CONVERSION METHODS *** DO NOT USE JAVA'S PARSE COMMANDS *** USE System.out.printf commands ONLY to print any data *** If you can not find a chip number corresponding to the error number, display N/A 6) From the main method call the following new methods: lowerCase() and upperCase() 7) On the lowerCase() method, using the System.out.printf command, display each lower case letter and the corresponding ASCII code Example: j=106 k=107 8) On the upperCase() method, using the System.out.printf command, display each lower case letter and the corresponding ASCII code Example: J=74 K=75 Submitting your program ----------------------- - For all Classes: Upload your program to Canvas. - Make sure the program is properly documented and aligned uniformally, looking professionally, I will take points off if it not. NOTE: If you have any question, please email me at michael.robinson@cs.fiu.edu We have FREE tutoring from Monday thru Saturday, please visit: https://users.cs.fiu.edu/~mrobi002/tutoring/includes/tutoringOnline2021Fall.php Office Hours Tuesdays and Thursdays from 4pm until 5pm Please remember that we are here to help you succeed in your classes