Download CS335 Tutorial on OSP/2 - Southern Illinois University

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

C Sharp (programming language) wikipedia, lookup

Java performance wikipedia, lookup

Thread (computing) wikipedia, lookup

Transcript
CS335 Tutorial on OSP/2
Instructor: Dr. Zhu
TA: Mr. Hongbo Zhou
Department of Computer Science
Southern Illinois University
Feb., 2009
Outline
• Introduction to OSP2
What, How, Why
• Details:
Project list, How to compile, debug and test,
submission, additional resources.
What is OSP2
• Two Parts in OSP2
1, Simulated hardware platform/ Environment
including CPU, Disk etc.
2, An Implementation of Modern Operating System
including File system, Memory
management, etc.
• Mainly developed for programming practice of operating
system modules
How OSP2 works
• A simplified operating system (similar to Linux/Windows xp
etc.) runs upon a simulated hardware environment (like
VMware ).
• For educational purpose, the simulator is encapsulated.
• OSP2 comprises of several modules/projects for
programming practice, each module performs a basic
Operating system function.
–
–
–
–
Process/Thread Scheduling project
Resource Allocation project
Memory Management project
Interrupt Handling project
What is an OSP2 project
• Each project is independent of other projects.
• For example: Threads module project =
The whole OSP2 software
- Threads module
• For each project, you have to implement the missing
part, and recompile the whole OSP2 package, and then
test…
Why is OSP2
• A flexible environment for generating implementation of
Operating System(O/S) projects/tasks.
• Support a lot of modern concepts in O/S design.
• Using java, easy to implement, compile and test.
• Pay attention to how a module works, and spend less
time on the programming.
Details: OSP2 Prerequisites
• Current version written in java(previous version in c)
• Object- level Programming Concepts (classes,
objects, methods etc)
• Java Programming Environments(JDK, 1.5 or later)
• Can be compiled under both Linux and Windows, etc.
Details: Project list for OPS2
 OSP2 package consists of the following projects;
 Devices
 FileSys
 Memory
 Ports
 Resources
 Tasks
 Threads
Details: Know Your Task
 A module is selectively omitted from the
OSP2 system
 The Student implements the missing
part of the module
 OSP2 will link your implementation to the
standard OSP2 module, and do the
simulation automatically.
 Then you will get a new and complete
O/S (simulated…)
Details: What is a project like
 A project subdirectory contains the following
 Demo.jar : A demo program that demonstrates OSP2
simulation
 Makefile: for compilation and execution
 OSP.jar: a jar file that contains the classes needed for the
student project to run
 Template files: java template files that contains
information of the class and methods to be implemented
 Misc subdirectory: contains two files (params.osp and
wgui.rdl) for simulation for GUI configuration respectively
Details: How to compile
• Compile: javac –g –classpath .;OSP.jar; -d .
*.java
• Run: for the Demo project,
java –classpath .;Demo.jar osp.OSP
• Change Demo.jar to the
filename.jar(implementation file)
• For Unix/Linux platform: change ; to :
Details: Debug and test
• Two types of errors
1, Java Exceptions (easy)
2, Semantic Errors (hard)
• Using java debugger(jdb etc.) to determine
the type 1 errors.
• Using OPS2 system log (file: osp.log) to
determine type 2 errors.
Details: How to submit your project
 Submission
 Electronic file
 All files in one folder
 The folder must be zipped
 The format for the folder name;
– courseNumber.FirstnameLastanme.Projectx
 The zipped folder uploaded to SIUC Blackboard
Additional Resources
• OSP2 manual and source code are available at
http://www.springer.com/computer/programming/book/97
8-1-84628-842-5
• You also can find this tutorial at:
http://www.cs.siu.edu/~hbzhou/cs335tutorial.ppt
Threads Sample Project: project directory
Threads Sample Project: an overview
Threads Sample Project: where to
input your code
Threads Sample Project: your
implementation
Threads Sample Project: compile and
run
Threads Sample Project: simulation
ended successfully