imac mid 2011 ram installation issues
The mid-2011 iMac uses 4 - 204-pin PC3-10600 (1333 MHz) DDR3 SO-DIMM, so it seems that you've purchased the correct memory. The most likely cause of the problems you're seeing are improperly inserted- or faulty RAM. It can help to blow out the memory slots with compressed air and ensure that the RAM does not have grease or grime on any of the contacts prior to installation.

One method of debugging these problems is to try varying combinations of the RAM to determine which (if any) of the sticks is faulty. Try booting to 3 sticks and swap around. If one of the SO-DIMMs is faulty, you should be able to determine which it is and exchange it for another module.