The third and fourth heart sounds are generated by