Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this assignment is to give you some experience with working at the lower level of the operating system. In this assignment you

The purpose of this assignment is to give you some experience with working at the lower level of
the operating system. In this assignment you will run, observe, and study a simple X-OS that
controls a X CPU simulator,
You should download a package xsimos2023.zipfromthecoursewebsite.Thispackagecontains
the source code and utilities needed to complete this assignment.
Background
Suppose we have a simplified RISC-based 16-bit X-CPU, which has 16 general purpose registers
), and a couple of special registers, such as the program counter (PC) the status (state),
interrupt table (ITR) registers. Also, this X Architecture comprises 64KB (65536 bytes) memory
space with addresses ranging from 0 to 65535. According to the von Neuman architecture, CPU X
takes one cycle to execute any instruction, executing a standard Fetch, Decode, Execute.
The X-OS Kernel
The current x-OS is nave operating system (almost doing nothing -p). As discussed in class,
operating systems need support from the hardware to facilitate interaction between processes, users,
and IO devices. The general mechanism that facilitates these interactions is the interrupt. The
interrupt could come from an IO device, a system call, a trap, or a fault, depending on its origin.
An interrupt table (vector) allows the CPU to invoke an appropriate interrupt handler when an
interrupt occurs.
Once the X-OS system is initialized, CPU starts its cycles. Meanwhile, it is ready for serving
incoming interrupts.
2.1. The X-Simulator (xsim)
The X-Simulator, xsim, emulates a basic computer featuring a soft CPU. It is designed to allocate
a memory space of 64KB, load a "binary" file into this space, and initiate execution from the address
0x0000. The content of this "binary" file within the memory has a kernel and various user processes.
To execute a program, the X-Simulator employs a X-CPU simulation function (soft CPU), which
iteratively performs cycles involving fetching, decoding, and executing instructions indicated by
the Program Counter (PC). The execution continues for a specified number of ticks (cycles) or until
the program either halts the X-CPU intentionally or if the X-CPU encounters an illegal operation.
For example, the following is the way to let simulator to execute the binary file in 100,000 cycles,
/rsim 100000 xos
where x sim is the simulator program, which requires two parameters: a cycle number and a binary
filename. In the example above, they are 100,000, and x0 respectively.
image text in transcribed

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

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago