What is /system/bin/mediaserver on Android, and why is it pegging the CPU?
The media server is responsible for indexing the images, videos and music files on the device. It then is queried by programs like the media gallery or the music player for filtered lists of certain media types. 

I think that it would be restarted pretty fast after killing. I would assume that somehow there are many write options on the sd card and the media server will constantly reindex your mass storage. But I don't know a solution for that.