I found an article on the web in Japanese some time ago that mentioned that "osu" originated in the Japanese Navy, among the new recruits. It was used, as others mentioned before, as a shortened "ohayo gozaimasu." It morphed into a general reply to orders, as well as a general greeting. It was not considered polite at that time, but it has become a general, multi-purpose greeting or reply. It has sort of a "tough-guy" ring to it in general use in Japan, as someone mentioned earlier, often used in sports clubs etc.
I believe that the use of "osu" depends on the feeling of the dojo, and the dojo-cho.
I remember way back, Inagaki Sensei from the Iwama Dojo often brought his students from a university aikido club to train at the Iwama Dojo. They all used "osu" as a general reply.
Saito Sensei would tell students that "osu" wasn't used in the dojo.
I remember him saying this to one group of students of Inagaki Sensei's, who proceeded to reply with a whole hearted, and unified "OSU!"