Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design and develop a High-level program in JAVA to simulate the operation of the Shark Machine (see description below). Use a 1024- element array to

Design and develop a High-level program in JAVA to simulate the operation of the Shark Machine (see description below). Use a 1024- element array to simulate primary memory, where each word is 32-bits. Use variables to represent the registers (ACC, PSIAR, etc.). Each microoperation is to be simulated by a statement in the language of choice. For example, the first micro code instruction of the LOAD operation, add one to the PSIAR register and store it in the ACC register, would look like: acc = psiar + 1; in Java. Create an END instruction that dumps the contents of all registers and memory, then prints an End of Job message. Next you must design and implement a rudimentary operating system SharkOS that provides multiprogramming capability. You will implement batch jobs and a program loader that will allow your machine/OS to run in batch mode (one after the other) several Shark machine language programs to be loaded at startup. To accomplish the multiprogramming capability, you will define a job data structure. Jobs will be linked to a job queue that will execute each job in the order they were loaded. Upon completion of each job, SharkOS will provide the capability to switch to the next job if it exists. When this condition is encountered, you will print some state information such as which job will be loaded and the current state of the job queue. Your version of the Shark machine and SharkOS will then run three or more Shark machine language programs simultaneously. These programs will test the ability of your simulation to handle multi-tasking. You must develop the following Shark machine language programs to be run on your Shark machine/SharkOS: 2 1) Write a program in the machine language of the Shark machine that will total the numbers stored in locations 100 to 109 and place the result in location 200. 2) Write a program in the machine language of the Shark that will decrement the value stored in location 201 (must be at least 10) by one until the result is zero. Store the result in location 202. 3) Write a program in the machine language of the Shark that will increment the value stored in location 301 by two until the value has been increased by 20. Store the result in location 302.

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

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions

Question

2 What supply is and what affects it.

Answered: 1 week ago

Question

3 How supply and demand together determine market equilibrium.

Answered: 1 week ago