Working on the parts of the system that allow running user programs
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'
- Process Termination Messages
- Argument Passing
- System Calls
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)
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
A script scores the output as "pass" or "fail" and writes the verdict to t.result.
./src/userprog/builds make SIMULATOR=--bochs check
Tests: 71/76 pass
Provide the Pintos Gudie👍