Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Language/Platform The project must be written in C, C++, or Java. If using C or C++, you must use a Unix fork to create processes

Language/Platform

The project must be written in C, C++, or Java. If using C or C++, you must use a Unix fork to create processes and a Unix pipe for communication.If using Java, you must use the Runtime exec method to create processes and streams for communication.

image text in transcribed

image text in transcribed

image text in transcribed

Problem Overview The project will simulate a simple computer system consisting of a CPU and Memory. The CPU and Memory will be simulated by separate processes that communicate Memory will contain one program that the CPU will execute and then the simulation wil end. Problem Details CPU It will have these registers: PC, SP, IR, AC, X, Y. It will support the instructions shown on the next page of this document. It will run the user program at address 0. Instructions are fetched into the IR from memory. The operand can be fetched into a local variable. Each instruction should be executed before the next instruction is fetched. The user stack resides at the end of user memory and grows down toward address 0. The system stack resides at the end of system memory and grows down toward address 0. There is no hardware enforcement of stack size. The program ends when the End instruction is executed. The 2 processes should end at that time. The user program cannot access system memory (exits with error message) Memory It will consist of 2000 integer entries, 0-999 for the user program, 1000-1999 for system code. It will support two operations read(address) - returns the value at the address write(address, data) - writes the data to the address Memory will initialize itself by reading a program file. Problem Overview The project will simulate a simple computer system consisting of a CPU and Memory. The CPU and Memory will be simulated by separate processes that communicate Memory will contain one program that the CPU will execute and then the simulation wil end. Problem Details CPU It will have these registers: PC, SP, IR, AC, X, Y. It will support the instructions shown on the next page of this document. It will run the user program at address 0. Instructions are fetched into the IR from memory. The operand can be fetched into a local variable. Each instruction should be executed before the next instruction is fetched. The user stack resides at the end of user memory and grows down toward address 0. The system stack resides at the end of system memory and grows down toward address 0. There is no hardware enforcement of stack size. The program ends when the End instruction is executed. The 2 processes should end at that time. The user program cannot access system memory (exits with error message) Memory It will consist of 2000 integer entries, 0-999 for the user program, 1000-1999 for system code. It will support two operations read(address) - returns the value at the address write(address, data) - writes the data to the address Memory will initialize itself by reading a program file

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago