I decided to do some "extra" research based on den.thed's response to you and it does appear that you have a 2007 iMac.
To make sure about this so we can better advise,
To find out info about your system,
Click on the Apple symbol in the upper left of the OS X main menu bar. A drop down menu appears.
Click About this Mac. A smaller popup window appears. This gives you basic info like what version of OS X your iMac is running, the speed of your iMac's CPU and how much RAM is installed.
Click on the button that says More Info. A larger window appears giving you a complete overview of your iMac's hardware specs.
Highlight all of this info and copy/paste all of this into another reply to this post, editing out your iMac's serial number before actually posting the reply.
This will tell us everything about your iMac so we may begin to help with your iMac issues.
If you, indeed, have a 2007 iMac, that year and model can take a max of 6 GBs of RAM.
You can replace one of the 2 GB RAM modules with a 4 GB RAM module.
The only reliable and compatible supplier of the 4 GB RAM module is OWC (macsales.com)
Found here.
http://eshop.macsales.com/item/Other%20World%20Computing/5300DDR2S4GB/
I would purchase and install the max. RAM for your iMac, if your iMac turns out to be a mid 2007 iMac model.
Also, if you do not need the latest and greatest version of Adobe Photoshop, look to places like amazon.com for older versions of PS OR the entire creative suite. Sometimes you can find good deals from other sellers on Amazon other than Amazon, itself.
This is what I did.
If you find a deal from a private or third party seller, on amazon, you just need to contact that seller before an actual purchase and find out if the seller has completely de-authorized the software package from Adobe's website, and that the software will come with both the serial/registration codes, as well as, the online registration code that is needed to properly activate and register the software under your own name and Adobe ID, if you have one ( if you do hot have an Adobe ID and password to Adobe's website for registering their newer software, up to CS5, you will need to create one at some point if you purchase newer Adobe software from CS3 to CS5).
The oldest version of Photoshop you can still run on OS X 10.9 Mavericks is Photoshop CS 3 or higher OR the entire CS3 package or higher.
I have the complete print/design edition of Adobe CS3 that runs fairly well on OS X 10.9.4 Mavericks.
I, also, have and run just Adobe InDesign and Photoshop CS4, as well, running on Mavericks.
The CS4 versions appear to run pretty well under OS X Mavericks, too!