first of all, you need to understand that digital cameras are not perfect when it comes to metering on legacy lenses.
you may or may not be aware of this chart. I post it often, to show how ill mannered legacy lenses can be on digital cameras
your problem though, sounds worse, and may be more lens related than the camera.
the aperture setting should not impact exposure on the K5 as greatly as you desctribe, but if you look at the graph, faster than F4-5.6 will tendf to under expose and above this will over expose
the K5 should keep you always within a stop of correct exposure. The deffictive aperture ring, missing stops could be the issue, because you have no idea whether it moves or not either during exposure or during the stopped down metering process or both.
if the camera is consistent where you have solid aperture detents, it sounds as if the aperture ring is moving as you go, where there are no detents.
also, you are describing the shutter speed jumping for small adjustments, are you doing green button metering? that is how it is done for an M series lens. You should not see the shutter speed change AT ALL as you change the aperture ring, unless the lens has had the aperture activation lever removed and you are metering in AV mode.