Skip to content

Pintos project2: user programs, 71/76 tests passed

Notifications You must be signed in to change notification settings

whaleeej/Pintos-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Pintos Project2: User Programs

Working on the parts of the system that allow running user programs

Demo: how to use

To run user program "echo" on pintos

pintos-mkdisk filesys.dsk --filesys-size=2
pintos -f -q
pintos -p ../../examples/echo -a echo -- -q
pintos -q run 'echo x'

Requirements

  1. Process Termination Messages
  2. Argument Passing
  3. System Calls

Implements

void halt (void)
void exit (int status)
pid_t exec (const char *cmd_line)
int wait (pid_t pid)
bool create (const char *file, unsigned initial_size)
bool remove (const char *file)
int open (const char *file)
int filesize (int fd)
int read (int fd, void *buffer, unsigned size)
int write (int fd, const void *buffer, unsigned size)
void seek (int fd, unsigned position)
unsigned tell (int fd)
void close (int fd)

Build

First, cd into the userprog directory. Then, issue the make command. This will create a build directory under userprog, populate it with a Makefile and a few subdirectories, and then build the kernel inside.

./src/userprog/make

Testing

A script scores the output as "pass" or "fail" and writes the verdict to t.result.

./src/userprog/builds make SIMULATOR=--bochs check

Result

Tests: 71/76 pass

Reference

Provide the Pintos Gudie👍

About

Pintos project2: user programs, 71/76 tests passed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published