M42 lenses with an Auto/Manual switch and 'A' lenses will work on dslrs in Av mode. The 'A' lenses meter correctly. The M42 lenses do not in general meter 100% correctly without a little compensation dialed in. This varies by lens and by the aperture used. They are quite usable in Av but you have to be aware that you will need to correct based on the lens you are using.
Takumar (Bayonet), 'K' and 'M' lenses will not allow shooting in Av mode. You will need to shoot in manual, set the aperture by hand using the lens ring and use the green button or AV+- button to set the shutter speed (depending on camera model).
Functionally I do not believe there is any difference between 'K' and 'M' lenses. It appears that the 'M' lenses are in general a little smaller and lighter than their 'K' counterparts, although not all lenses were changed.
There is a sticky on this subject
here.