Skip to content

elopezsolis/ProcessTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

OS-ProcessTable

This project simulates a process table and some system calls. Each process control block has the following information:

  1. An integer referring to the process ID (pid)
  2. A String referring to the program being executed
  3. A String referring to the user name running the program
  4. An integer referring to the current status. A 0 indicates the program is running, a 1 indicates the process is ready, and a 2 indicates the process is blocked
  5. Six integers referring to register contents
  6. They will contain the following registers:
    (a) pc (program counter)
    (b) sp (stack pointer)
    (c) r0 (register 0)
    (d) r1 (register 1)
    (e) r2 (register 2)
    (f) r3 (register 3)

Commands to modify the process table

  • fork: makakes a copy of current runnig process
  • kill <pid>: kills the process with specified id
  • execve <program> <user>: switches the program and username for the currentrly running program to the values specified
  • block: blocks the current running process
  • yeild: puts the current running process into ready state
  • exit: causes the running process to exit
  • print: prints the CPU table
  • unblock <pid>: moves the blocked process with the specified pid to the ready state
  • Example

    Example

About

This project implements a process table

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages