Operating systems project - multiprogramming batch system

Assignment Help Operating System
Reference no: EM131869244

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: EM131869244

Questions Cloud

What is nominal cost of its nonfree trade credit : If a firm buys under terms of 2/15, net 45, but actually pays on the 20th day and still takes discount, what is the nominal cost of its nonfree trade credit?
Risk and quality management tools matrix : HCS - Imagine you are a quality leader for a health care organization and have been asked to create a manual for new employees
What did you learn about economic development : What did you learn about economic development and supply chain in the Findlay-Hancock County area?
Would the current court still uphold federalism in the same : To what extent should the government be involved in social issues? Choose a specific example to support your opinion.
Operating systems project - multiprogramming batch system : 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
Cost of trade credit : A large retailer obtains merchandise under the credit terms of 1/15, net 40, but routinely takes 65 days to pay its bills.
Should the government act contrary to that desire of public : When an overwhelming majority of Americans have a particular position, should the government act contrary to that desire of the public?
Discuss about the use of a brand : Some employers must provide unpaid leave for family- and medical-related reasons under the Family and Medical Leave Act (FMLA). Paid leave is not required.
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.

Reviews

len1869244

2/19/2018 4:21:37 AM

Read all the instructions carefully before starting the work and follow them while solving the assignment. Note: If solutions are not posted as per given deadline, late submission penalty would be applied. 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.

len1869244

2/19/2018 4:21:29 AM

DUE DATE Note: You are to sign up for a demonstration of your project, which is going to be on the day the project is due. Demonstrations will be on CSX (the Computer Science Department's main instructional computer), thus you must develop your program on CSX, or upload your program for demonstration. In the latter case, you should be aware of and handle potential language and compiler incompatibility problems between your development platform and the demonstration platform. In short, your project (simulation program) must compile and run on CSX. Also, the deliverables for this step are to be submitted at the time of the demonstration. All deliverables are to be hard copy (i.e., paper copy) submissions. No soft copy submissions such as email, CDs, or flash drives will be accepted. No handin submissions are required either.

len1869244

2/19/2018 4:21:12 AM

IMPORTANT Design Note: Conceptually, your simulation is a virtual machine. Conventional architecture and operating system component functionalities and restrictions should be adhered to, i.e., your code should be properly modularized not by size but by function. There is ample opportunity for tailoring/customizing or personalizing/individualizing your simulation during implementation. This refers to the relative internal implementation latitude vs. strict external functional behavior. Nonetheless, any significant departure from the specification must be approved by the instructor. DOCUMENTATION GUIDELINES: Your simulation program (i.e., the instruction set simulation of the underlying architecture and the batch operating system) must include external and internal documentation.

Write a Review

Operating System Questions & Answers

  Convert the program of project 3 to get its input data file

The following is a sample run in the the case that no input file was specified on the command line and the test file proj3-input.txt was specified by the user. User input is in bold blue:

  A 2.5 ghz pipelined mips processor

While working with a 2.5 GHz pipelined MIPS processor which has a L2 cache unit miss penalty of 10 ns and a memory miss penalty of 50 ns, determine the Effective CPI for a program with a 0.4% instruction miss rate, 11.4% data miss rate, a L2 miss rat..

  Determine transmission line speed

Imagine you are creating an application at work that transmits data record to another building within the similar city. The data records are 500 bytes in length,

  Stateful inspection packet filtering routers

Name two benefits of Stateful Inspection Packet Filtering Routers. Name two benefits that firewalls add to a network

  A lock variable not a good solution for mutual exclusion

why is busy waiting on a lock variable not a good solution for mutual exclusion?

  Determining race condition in protocol

What is race condition in this protocol?debitcard machine determine current value of card in dollars which is stored in value x.

  Windows server deployment proposal

Each student will create a detailed, organized, unified technical solution given the scenario described below. The submission will be in a written format, with at least one diagram, and may include additional diagrams, charts or tables. The assign..

  How many different dll files did you find

How many different dll files did you find? What command would your write to find name of the 2,317thdll file in this list?

  Phase 1the premise of project 2 is to create your own shell

phase 1the premise of project 2 is to create your own shell. your shell will be launchable from a terminal window and

  Discuss the benefits and drawbacks of using hibernate

Consider issues such as complexity of the application code with and without Hibernate. Explain in what ways you would consider changing the Hibernate framework.

  Inventory management systemsyour sister owns a small

inventory management systemsyour sister owns a small clothing store. during a conversation at a family dinner she

  What is the purpose of the linux login shell

hat are the steps for entering the menu to add a user in Linux?

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