Skip to content

CS 2301 Operating Systems 1 - 2. Abstraction and Process - Writing Assignment 2

Statement

solution

  • following the I navigated to ActivityMonitor on my machine, which opened in the following window:

ActivityMonitor

  • I then navigated to the CPU tab and sorted the processes by CPU usage (by clicking on the header as shown by the red arrow) in descending order, which resulted in the following:

CPU tab

  • I then took screenshots of the first ten processes, which are shown below:
    1. Spotlight.
    2. WindowServer.
    3. notifyd.
    4. kernel_task.
    5. screencapture.
    6. backboardd.
    7. coreaudiod.
    8. Production-GLOBAL.
    9. AcitvityMonitor.
    10. Stats.
    11. bluetoothd.
    12. SimMetalHost (iPhone 13: render-server).
  • I will start explaining the details around each one of these processes, including the following data:
    • Process name.
    • CPU Usage and Time: how much CPU time the process has used and how much time it has been running.
    • Thread count.
    • Idle wakeups: The number of times the process was woken up from idle sleep, to begin executing this thread (Intel, n.d.).
    • Process Function.
    • Information Explaining the stats above.
  • I lasted rebooted my server yesterday which is now up for 1 day, 11:41.

1. Spotlight

  • Process name: Spotlight.
  • CPU Usage and Time: 777.5% and 1:43:49.43.
  • Thread count: 5.
  • Idle wakeups: 0.
  • Process Function: Spotlight is a search tool that helps you find files, folders, and other information on your Mac. It uses the information in your Mac’s index to find what you’re looking for. Spotlight is available in the menu bar at the top of your screen.
  • Explanation:
    • Spotlight helps in searching for things on your computer. To make the search faster this function needs to be running in the background, indexing content for faster search.
    • I had bad experience with this function in the past, using a lot of CPU and memory, and slowing down my computer. It turns out that my work folders had a lot of node_modules folders, which were constantly changing and indexed by Spotlight. I altered the settings of Spotlight to ignore my work folders, since I use the editor’s search function instead.
    • This function uses 77.5% of one CPU core, which is a lot, I need to probably look into this, and reducing its usage.

2. WindowServer

  • Process name: WindowServer.
  • CPU Usage and Time: 27.5% and 4:19:18.92.
  • Thread count: 29.
  • Idle wakeups: 489.
  • Process Function: WindowServer is the core of the window server. It manages the display of windows on the screen, and receives input from the mouse, keyboard, and other input devices. It also manages the display of the desktop picture and the Dock. All open Apps rendered on display screen using this process (Full Page, n.d.).
  • Explanation:
    • I have a dozen of applications open, along with the default mac features like the Dock, the menu bar, and the desktop. All of these are rendered by WindowServer, which explains the high number of threads (29).
    • Every time the device sleeps, then I wake it up, WindowServer is the process that wakes up first, that’s why it has 489 idle wakeups.
    • I last rebooted my server yesterday which is now up for 1 day, 11:41, but last awaken was 4 hours ago, which explains the CPU time usage.

3. notifyd

  • Process name: notifyd.
  • CPU Usage and Time: 11.3% and 16:08.00.
  • Thread count: 3.
  • idle wakeups: 0.
  • Process Function: notifyd is a daemon that manages notifications on macOS. It is responsible for displaying notifications, and for managing the notification center (FlyLib, n.d.).
  • Explanation:
    • I have a lot of notifications on my computer, which is why this process is using 11.3% of one CPU core.
    • I was running a couple of React-Native applications, which were constantly sending notifications to my computer, and I was running Slack, Chrome ..etc. which explains the number of threads (3).

4. kernel_task

  • Process name: kernel_task.
  • CPU Usage and Time: 7.8% and 1:58:10.43.
  • Thread count: 592.
  • idle wakeups: 1959.
  • Process Function: The kernel_task process is the kernel of the operating system. It is responsible for managing the hardware and the system resources.
  • Explanation:
    • The kernel_task process is the kernel of the operating system, so it has a lot to do.
    • One thing to notice is the number of threads (592), which is reasonable, since it is the kernel of the operating system.
    • Number of idle wakeups is high, which is expected, since the device was sleeping for a long time, and the kernel_task process is the first one to wake up.
    • Note how performant the OS, even though it has hundreds of threads, it is using only 7.8% of one CPU core.

5. screencapture

  • Process name: screencapture.
  • CPU Usage and Time: 5.5% and 0:38.
  • Thread count: 3.
  • Idle wakeups: 0.
  • Process Function: screencapture is a command-line utility that takes screenshots of the screen. It can capture the entire screen, a window, or a portion of the screen. It can also capture the screen at a specified interval, and save the screenshots to a file (Apple, n.d.).
  • Explanation:
    • I was taking screenshots of my screen, which explains the high CPU usage.
    • This function uses 5.5% of one CPU core, but for short periods of time, which is reasonable.

6. backboardd

  • Process name: backboardd.
  • CPU Usage and Time: 5.5% and :07:39.00.
  • Thread count: 7.
  • Idle wakeups: 846.
  • Process Function: ts chief purpose is to handle events from the hardware, such as touches, button presses, and accelerometer information. BackBoard also manages the launching, suspension, and termination of application processes.
  • Explanation:
    • This process does a lot for the device, and it is one of the first process to wake up when the device is awaken from sleep (in respond to some I/O).

7. coreaudiod

  • Process name: coreaudiod.
  • CPU Usage and Time: 5.2% and 52:08.00.
  • Thread count: 12.
  • Idle wakeups: 299.
  • Process Function: coreaudiod is a daemon that manages audio input and output devices. It is responsible for playing audio, recording audio, and managing audio devices (How-To-Geek, n.d.).
  • Explanation:
    • Audio is such an important part of the machine which is why this process is using 5.2% of one CPU core and has 12 threads, 299 idle wakeups, and 52 minutes of CPU time.

8. Production-GLOBAL

  • Process name: Production-GLOBAL.
  • CPU Usage and Time: 3.9% and 08.37.
  • Thread count: 32.
  • Idle wakeups: 74.
  • Process Function: This is actually a process that I run on my computer, it is React-Native application that I am developing.
  • Explanation:
    • React Native usually has a lot of processes and threads running in the background, for development, bundling, debugging, connecting to the simulator ..etc.
    • This process is also using sockets to communicate with an external server a long with HTTP requests, which explains the high number of threads (32).

9.Activity Monitor

  • Process name: Activity Monitor.
  • CPU Usage and Time: 2.3% and 07:24.
  • Thread count: 5.
  • Idle wakeups: 4.
  • Process Function: Activity Monitor is a utility that lets you view information about all the processes running on your Mac. It can also show you which processes are using the most CPU, memory, disk space, and network bandwidth.
  • Explanation:
    • I just ran this process for this exercise’s sake.

10. Stats

  • Process name: Stats.
  • CPU Usage and Time: 1.9% and 21:54
  • Thread count: 14.
  • Idle wakeups: 10
  • Process Function: Stats is a copy of Activity Monitor, but it is a third-party application that gives you more information about your Mac at every second.
  • Explanation:
    • This process runs by default when the computer starts.

References