Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project 4 #70

Closed
6 tasks done
omegaphoenix opened this issue Feb 4, 2017 · 4 comments
Closed
6 tasks done

Project 4 #70

omegaphoenix opened this issue Feb 4, 2017 · 4 comments
Assignees

Comments

@omegaphoenix
Copy link
Owner

omegaphoenix commented Feb 4, 2017

  • Argument Passing Every user program will page fault immediately until argument passing is implemented.
  • User memory access (see section 5.1.5 Accessing User Memory). All system calls need to read user memory. Few system calls need to write to user memory.
  • System call infrastructure (see section 5.3.4 System Calls). Implement enough code to read the system call number from the user stack and dispatch to a handler based on it.
  • The exit system call. Every user program that finishes in the normal way calls exit. Even a program that returns from main() calls exit indirectly (see _start() in "lib/user/entry.c").
  • The write system call for writing to fd 1, the system console. All of our test programs write to the console (the user process version of printf() is implemented this way), so they will all malfunction until write is available.
  • For now, change process_wait() to an infinite loop (one that waits forever). The provided implementation returns immediately, so Pintos will power off before any processes actually get to run. You will eventually need to provide a correct implementation.
@celerysticker
Copy link
Collaborator

celerysticker commented Feb 16, 2017

  • Deny writes to files in use as executables.
  • Process termination messages. Whenever a user process terminates, because it called exit or for any other reason, print the process's name and exit code, formatted as if printed by printf ("%s:exit(%d)\n", ...);

@omegaphoenix
Copy link
Owner Author

omegaphoenix commented Feb 16, 2017

Deny writes to files in use as executables: 4c34acc
Process termination messages: see sys_exit()

@celerysticker
Copy link
Collaborator

^ are processes ever terminated in other ways, or should we always call sys_exit()? e.g, if there's an error

@omegaphoenix
Copy link
Owner Author

In the system calls, sometimes it says to return -1 instead of failing. See the assignment section 5.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants