Complete Specs for Mid-2010 iMac & Early-2011 MacBook Pro?
iMac (21.5 and 27-inch, Mid 2010) - Technical Specifications
iMac: How to remove or install memory
MacBook Pro (13-inch, Early 2011) - Technical Specifications


AFAIK the CPU is not replaceable on any current Mac model.