Operating systems project - simple batch system with memory

Assignment Help Operating System
Reference no: EM131869236

Assignment Project -

The Operating Systems course project is divided into three steps:

1. A simple batch system

2. A simple batch system with memory management

3. A multiprogramming batch system with process management

The description of Step 1 will be given in 3 parts:

1.  Characteristics of the hardware

2. Instructions

3. Characteristics of the software

1. CHARACTERISTICS OF THE HARDWARE

The computer to be simulated has the following characteristics:

MEMORY - The main memory consists of 256 words (locations 0 to 255). A word is the basic addressing unit. Each word is 16 bits wide.

CPU - The computer being simulated is a stack machine; that is, an architecture which supports one or more stacks.

a. The architecture for this machine supports one stack (S), which consists of 7 registers, each register being 16 bits wide.

S (7 : 1) <15 : 0>

The top element of the stack may be used as an accumulator. Initially, the stack is empty (the Top Of Stack pointer is 0).

b. The Top Of Stack pointer (TOS) points to the current top of the stack. Since there are at the most 7 elements on the stack, 3 bits are necessary to hold the value of TOS.

A value of zero represents an empty stack.

Attempting to decrement TOS below zero results in an illegal instruction trap.

c. The CPU also needs to keep a register for the program counter (PC). The PC is 7 bits wide. Both the PC and the address calculation will allow an individual user segment to address only half of memory.

d. The CPU maintains a register to hold the instruction being executed, called the INSTRUCTION REGISTER (IR). The IR has to be 16 bits wide.

e. A BASE REGISTER (BR) is necessary to hold the base address of the program being executed. It has to be 8 bits wide to address all of memory.

INPUT/OUTPUT DEVICES -

Input and output devices are generally simulated by files (for user jobs in loader format, trace files, etc.), however in Step 1 the individual user job I/O is via keyboard/screen.

CLOCK - A system-wide CLOCK will be used to time the execution of programs in terms of virtual time units (vtu). Later in the specification, it will be made clear when the CLOCK is to be incremented.

2. INSTRUCTIONS -

The system supports data of types integer and bit. The range of integer values may span from -2^13 to (2^13)-1. The values will be represented in 2's complement.

Instruction format will be of 2 types, zero-address and one-address instructions (short or long). Due to the nature of the machine and its high reliance on stacks and stack operations, many instructions are zero address instructions that utilize the top 2 elements of the stack. Furthermore, because of the flexibility introduced through the stack architecture, many operations may be used with both zero and one address.

i. ZERO-ADDRESS INSTRUCTIONS (7 bits)

A zero address instruction is an instruction of the simplest form. This instruction format will utilize the top or top two elements of the stack depending upon the operation to be performed, or will generate a program halt.

79_figure.png

where

T = instruction type (short = 0)

U = unused

OP = op code

FUNCTION:

S(Tos-1] <- (S(TOS)) op (S(TOS-1))

TOS        <- TOS-1

The operator "op" is applied to the contents opf the top two elements of the stack and the result is placed on the stack. Or

S(TOS) <- op (S(TOS))

The operator 'op' is applied to the contents of the top of the stack and the result is placed on the stack. TOS does not change with the execution of this instruction.

Whenever possible, there will be two instructions of type 1 per memory word. If it is not possible to have two instructions of type 1 in a word, the unused bits will be padded with zeros (i.e., a NOP will be inserted).

ii. ONE-ADDRESS INSTRUCTIONS (16 bits)

A one-address instruction will contain an instruction type indicator of 1 bit, a 5-bit op code, an indexing bit, and a memory displacement address. This instruction type will also utilize the stack directly for operations requiring more than one operand.

EFFECTIVE ADDRESS CALCULATION

The effective address calculation computes the virtual address of the operand. There are two modes of addressing:

EA = DADDR       without indexing

EA = DADDR + (S(TOS)) with indexing

The conversion of the virtual address into a real address is done in the Memory Routine when the contents of the BR are added.

1976_figure1.png

where

0 - 6 : displacement addressing

7 - 8 : unused

9 : index bit (0:no indexing; 1:indexing)

10 - 14 : op code

15 : instruction type (long = 1)

3. CHARACTERISTICS OF THE SOFTWARE

SYSTEM (Step 1) will be the driver for this simulation. It will contain modules; LOADER, CPU, MEMORY, and ERROR_HANDLER. LOADER will be responsible for loading user jobs (in loader format) from the input device (a file) into main memory via a LOADER buffer of size four words. A user job has to be converted from HEX to BINARY before it may be loaded. The LOADER will need to access main memory, but this access may be made only via the MEMORY routine.

After the program has been loaded, it has to be executed. The CPU routine will be responsible for execution. Whenever a program terminates, control is transferred to SYSTEM. SYSTEM will then verify if there is another incoming job (i.e., another user job in the input file) and the cycle will be repeated. For Step 1, batches are of size one job each, so there should be no cycling.

MEMORY PROCEDURE

MEMORY (X, Y, Z)

X "READ" or "WRITE"

Y memory address (EA)

Z variable

The memory routine is responsible for translating all virtual addresses to real addresses and then performing the actual read or write operation on memory. In the first step of the project, the translation is to simply add the contents of the BR to the virtual address (later it will involve a look-up in the segment tables and page tables). Notice that this addition of (BR) is done not only to the effective addresses specified in user instructions but also to the PC and to the addresses passed by the LOADER routine.

READ operation: Notice that the READ operation is a MEMORY MANAGER function and NOT the RD operation from the instruction set.

FUNCTION: The contents of Y (memory location EA) will be read into variable Z.

WRITE operation - Notice that the WRITE operation is a MEMORY MANAGER function and NOT the WR operation from the instruction set.

FUNCTION: The contents of variable Z will be written into main memory location Y. Variable Z. may be the top of the stack used by the rpU, a buffer used by the LOADER, or other temporary scratch pad registers needed by the CPU.

INPUT: The input to your Step 1 is a file of hex digits which is a "user job" or 'user program" in loader format. The "input" to the user job, if indeed it requires any input, will be provided at the keyboard.

OUTPUT: It is only the user job's output (more specifically, the result of execution of WR instructions) that is to be displayed on the screen. The following information is to be output to a file (a virtualized output device) upon completion of a user job. Note that this "output" consists of some information generated by your operating system on behalf of the user job.

1. Cumulative job identification number (this number is reset each time that you start your operating system simulation). This should be I for this step since your simulation will handle exactly one "user job" each time that you run it. The reason is the absence of a multiprogramming memory manager and a scheduler, and the lack of a JCL in Step 1. Consequently, your operating system will run a single job and then stop, there can be no transition to another job, and, therefore, the output file and the trace_file must not be cumulative for the successive runs of your system.

2. Any warning messages resulting from handling a user job.

3. A message indicating the nature of termination: normal or abnormal; and, if abnormal, a descriptive error message.

4. Output of the current user job (if job terminated normally). As mentioned earlier, this is in addition to the output being displayed on the screen.

5. CLOCK value in HEX at termination.

6. Run time for the job in decimal, subdivided into execution time, input/output time, etc. Note that all 'times" refer to virtual time periods as measured by differences between values of the simulated system's CLOCK at different instances.

Attachment:- Assignment File.rar

Verified Expert

Here we have done the assignment for encryption with hax to binary where setting all it will go to CPU class and call method.This method call to run CPU method where the process for EA and perform all conversion, In this method, get opcode and according to opcode and according to call feed method where set CPU clock and CheckOpCode and bit. The get memory method set data to temp memory.

Reference no: EM131869236

Questions Cloud

What is another interpretation or viewpoint of the issue : The information provided in the summary will lay the foundation for you to react and respond to (analyze) the political issue.
How would a leader demonstrate and encourage support : How would a leader demonstrate and encourage support of this principle in an organization? Discuss an example of an organization which has demonstrated.
Summarize the goals created for stevens district hospital : Now that you have completed your review of the Strategic Plan for Stevens District Hospital, you have been asked to provide a presentation to the governing.
Summarize the case and describe the participants : Summarize the case and describe the participants. Describe how this case relates to ethics in marketing, advertising, and product safety.
Operating systems project - simple batch system with memory : The Operating Systems course project is divided into three steps: A simple batch system and A simple batch system with memory management
Create and evaluate professional documents : Create an outline of your presentation in Word or Excel. Focus on short bullet points and key things that you want to say.
Firm does not pay dividend : A firm does not pay a dividend. It is expected to pay its first dividend of $0.22 per share in three years. This dividend will grow at 7 percent indefinitely.
Determining the early days of e-commerce : During the early days of e-commerce, first mover advantage was touted as one way success on the other hand, some suggest that being
How much is owed in total at the maturity date : Calculate the simple interest for a loan for $24,700, for 2 1/4 years at 3.4% interest per year. How much is owed in total at the maturity date?

Reviews

len1869236

2/19/2018 4:19:36 AM

NOTES: SPECIFICATION Note: You must keep up with class discussions concerning the project specification. As a result of the discussions in class, there may be some changes in the project specification as outlined in this document. LOADER Note: The LOADER should not do any preprocessing/parsing/checking of the loader format. The LOADER subsystem will read/load as specified above, i.e., using a buffer of size four words. This is consistent with the DMA (direct memory access) convention used in computer systems. NAMING STANDARDS: The driver of the first step of the project is to be named SYSTEM if possible (this depends on the language of implementation). Other descriptive names such as MEMORY, CPU, LOADER, ERROR_HANDLER, etc. must be used, as specified in this document, to name the related functions.

len1869236

2/19/2018 4:19:02 AM

TRACE Information Output Note: When the trace bit is on, the trace information generated should be put in a separate file (i.e., the trace file) in columns with appropriate column headers. Note that the trace file you will generate and the trace file that you will turn in as part of your deliverables are not necessarily the same. To save paper, you will turn in only some representative parts of the actual trace file that your system generates by following the steps outlined in the PROCEDURE appendix below. Voluminous printouts will not be accepted. Printout font point size must not be less than 10.

len1869236

2/19/2018 4:18:41 AM

LATE PENALTY: 10 points per calendar day late, out of a total of 100 points. The precise due time is the demo time. For late projects, no later than one week after the due date, penalty calculations will be based on the system time stamp on CSX for ALL of the deliverables including the software engineering report. Notes: Consider the probability that the system (i.e., CSX) could be down, or have system hardware/software problems, a few days before the due date.

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd