Niceness modifies the scheduling priority of a given process which determines how much CPU time it receives. When you increase
the niceness, it's priority decreases
. The same goes for when you decrease
the niceness, the priority will increase
. This is helpful in scenarios such as giving a process more priority if it needs to perform faster. This is also helpful if you want to limit a process that would otherwise take up unnecessary CPU usage.
This application allows a user to:
- See how much CPU usage the selected process is using
- Determine if the process is "stable", "unstable" is defined as rapid fluctuations in CPU usage
- Allow the user to modify the "niceness" of the selected process
The gif below demonstrates how the application works. In the background, I was using Photoshop to spike the CPU usage.
(Note: This was recorded with LICEcap which distorted some of the colours)
Make sure that you computer has the same (or similar) stats listed in the development section below. Note that this application was not tested on other computers, and does not guarantee that it will work on yours.
-
Download
Fuji.app
. -
You need to run this file as the root user, so in a terminal type:
sudo Fuji.app/Contents/MacOS/Fuji
. This should launch the application automatically. The reason for this is explained here.
The application runs on a 5 second timer, so you'll need to wait a few seconds for data to update.
Language: Objective-C
Tools: Xcode version 9.2
Platform: macOS High Sierra
Processor: 2.5 GHz Intel Core i7
Note that this app has not been tested for cross platform compatibility.
See the wiki for a list of active system calls and resources.
Description | Completion goal | Issue | Completed |
---|---|---|---|
Visualize running processes including the process name, PID, and NI | March 12 | #5 | ✅ |
Visualize individual process CPU values | March 16 | #6 | ✅ |
Visualize CPU usage across the whole system | March 20 | #20 | ☑️ |
UI supports modifying NI | March 30 | #13 | ✅ |
Track CPU logic and fluctuating patterns | April 6 | #26 | ✅ |
CPU recommendations | April 10 | #27 | ✅ |
The following help explain how major tasks were completed:
- Connecting a controller to the UI
- Using instance methods
- Create a button
- CPU usage for an individual process
- How to run the application as root
This project was part of my COMP3000 Operating Systems class at Carleton. The project outline stated that we could "create anything that improves some aspect of an operating system."
🤪Some silly goofs:
As the project deadline approached, some corners needed to be cut in favour of finishing the application on time. These are some of them:
- The circles are actually made out of "O" letters, with increased boldness and font size
- The "cards" are actually just enlarged text fields
- You can freely resize the window, revealing a lot of empty space and a few unused text fields 🙈