1 / 11

CS 450 MPX Project

CS 450 MPX Project. Introduction to MPX. Introduction to MPX. The MPX module is divided into six modules: Module R1: User Interface Module R2: Process management framework Control structure for processes ( P rocess C ontrol B lock) Queues to hold PCBs

Télécharger la présentation

CS 450 MPX Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.


Presentation Transcript

  1. CS 450MPX Project Introduction to MPX

  2. Introduction to MPX • The MPX module is divided into six modules: • Module R1: User Interface • Module R2: Process management framework • Control structure for processes (Process Control Block) • Queues to hold PCBs • Functions to create, destroy, and maintain PCBs • Module R3: Process scheduling • Dispatcher to run processes • Interrupt handler to process interrupts • Module R4: Dynamically loading MPX processes from files • Module R5: Serial Communications Driver • Read and Write bytes to the serial (COM) port • Module F: Putting it all together • Continuous Dispatch & I/O scheduling

  3. Programming Environment • Windows Operating System • Must have administrator access for Modules R5 and F • C programming language • Any ANSI C compiler will work, however use of Turbo C version 1 or 3 is highly recommended. If you do not use Turbo C, you will need to inject assembly code into your project- which will greatly increase development and debugging time.

  4. User’s Manual • Purpose is to describe the functionality of your MPX project to potential users of your system- which would be persons sitting at the terminal and using your MPX system. • Users should be able to completely use your system by referencing the user’s manual.

  5. User’s Manual Outline • Table of Contents • Overview of Comhan / MPX • Paragraph summarizing the system • Summary of all commands • A list of all the commands and a blurb about each • Detailed description of each command • Syntax • Use • Example of use • Possible errors/error messages • Index

  6. Programmer’s Manual • Should provide all information necessary for programmers that have never seen your code before to modify or enhance your code • Describes the program structure and how your program operates

  7. Programmer’s Manual Outline • Table of Contents • Overview of MPX and Comhan • Paragraph(s) about the system, including the principal elements such as command handler, interrupt handler, device driver, etc. • Summary of the contents of each file • List the functions/data structures and brief blurb about each • Description of each function • Prototype • Parameters- data type, description • Return value, including returns when an error is encountered • Description of what the function does • Description of all data structures • Use • Attributes- list including data types and brief description • Global variables- list including data types and description • Cross reference • For each function, which functions does it call, and which functions call it? • Index

  8. Code Comments • You should use good commenting habits when you write your code, including commenting specific portions of code- examples in the I1 manual. • Use inline comments (//) rather than block comments (/*…*/), except for headers. Reserve /*..*/ for debugging. If you try to comment out a section of code that contains a block comment, C will terminate all block comments at the first instance of */ • At a minimum, you should have the following comments (will be part of your final grade): • File Header • File Name • Author Names • Version/Last Modified Date • Procedures/Data Type Header • Procedure Name • Parameters- name, type, and its purpose • Return value • List of procedures called and global variables accessed/modified • Description and purpose

  9. Support Software • Support software is available for use with your project. This support software handles some low level operations for you. You can download the support software from Dr. Mooney’s website. It is the MPX_SUPT.C and MPX_SUPT.H files. • You should include MPX_SUPT.H in your source files and put MPX_SUPT.C into your Turbo C project so it gets linked with your other source files. • Many support functions return error codes, such as ERR_SUP_DATINV. These are listed in the MPX_SUPT.H file and in the manual for the module in which each function is used.

  10. Tips • Plan ahead- begin working on your modules right away, and plan on spending at least 3-5 days debugging. • Develop an effective method of version control and find a central repository for your code. Google groups and subversion have been used successfully in the past. Keep track of who modified what in comments and in a change log • Create an “error handling” function that takes in an integer error code as a parameter and prints out an appropriate error message. • Use symbolic constants: • For the size of ALL arrays • Anytime you use a number to represent something • Error codes • Create a single .C and .H file for each module • Pay attention to your use of pointers

  11. Tips (Con’t) • Make sure you are null terminating strings • Handle ALL possible errors • Prioritize extra credit, but complete it • For each module, create init() and cleanup() functions. The init() function will perform initialization of any global variables, data structures, or devices used by that module, and cleanup() will reclaim any memory allocated by functions in that module. This will make starting and exiting your MPX system easier.

More Related