They will NOT work with Yosemite, El Capitan or Sierra. However, you may not be able to upgrade the OS if you are running any of the following non- apple software products. Increasing speed and performance by up to 400% is possible on older Macs by replacing the HDD with an SSD or a new HDD.
Upgrading Mac OS (to High Sierra or Mojave) may not be possible if you are still running older versions of some non- apple software