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

Implement ps #1

Merged
merged 10 commits into from
Mar 20, 2023
Merged

Implement ps #1

merged 10 commits into from
Mar 20, 2023

Conversation

Make-IT-Wright
Copy link
Owner

Implemented the following:

  • a ps() system call that returns information about processes known by the kernel
  • a ps user program that calls the ps system call and outputs information about processes known by the kernel
  • a longRunner user program that runs for a long time so that ps has something to output information about

try

longRunner &
ps

@Make-IT-Wright Make-IT-Wright self-assigned this Mar 20, 2023
@Make-IT-Wright Make-IT-Wright merged commit 69cb5b1 into master Mar 20, 2023
@@ -520,17 +550,9 @@ kill(int pid)
void
procdump(void)
{
static char *states[] = {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved these definitions to top of file because now used in more than one function

@@ -2,10 +2,25 @@
#include "stat.h"
#include "user.h"

static struct procInfo arrayOfProcInfo[1024];
static const char * const states[] = {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used to convert enum values into human readable words

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

Successfully merging this pull request may close these issues.

1 participant