Department of Computing: Lab 2: Introduction To Pintos Programming Project 1
Department of Computing: Lab 2: Introduction To Pintos Programming Project 1
This lab is designed to be a review and help session to get you started on the first Pint OS
programming project.
Objectives
Objective of this lab is to entertain your quires related to the first Project of Pint OS and check
your understanding about the starter code.
Tools/Software Requirement
Pint OS
Description
ii) Understanding the starter codebase that you have to modify to implement the first Pintos
programming project.
iii) Help with any issues installing Pintos. If you have any questions or problems, please talk to
the course staff and we will help you fix them.
Installation:
http://web.stanford.edu/class/cs140/projects/pintos/pintos.tar.gz
i) cd $PINTOS_HOME/src/threadscdcd
ii) make
iii) make check
These three steps will compile the code (step ii) and then run all of the tests for project 1. If this
goes well, it means your machine is properly configured for you to start coding for project 1.
The newer version of qemu has a different shutdown sequence than the older version. As a result,
while
your code may work correctly, qemu may not exit properly, cause ‘make check’ to fail the test.
To solve this problem, you need to add a single line to devices/shutdown.c. After line number
104 in the
function shutdown_power_off( ), add the following line:
outw (0xB004, 0x2000);
So your new code at that segment will look like:
for (p = s; *p != '\0'; p++) {
outw (0xB004, 0x2000);
outb (0x8900, *p);
}
Last Step:-
Pintos and other utilities are used to talk to Pintos. To run these utilities from any directory, add
below mentioned line at the end of $HOME/.bashrc file and restart the terminal:
“export PATH=$HOME/os-pintos/pintos/src/utils:$PATH”
https://tssurya.wordpress.com/2014/08/16/installing-pintos-on-your-machine/
Once your installation is complete, the output on terminal looks like this:-
Tasks
Create a write-up describing what you have done so far with respect to installing and running
Pintos, and what you have understood about the assignment and about the starter code.
Deliverables