The two words do have distinct meaning, and in this case, operation would be the correct word to use in that context.
function describes the intent and purpose of a thing. In the case of a school, the school's "function" is to serve as a place of teaching by the resident staff for the edification of and learning by the resident students. A purpose and intent lacks any real connotation of how well it might actually operate, it is a definition.
operation describes the performance and implementation of the function of a thing. In the case of a school, the school's "operation" is the act of teaching the students by the staff. A smoothly operating school performs its function well...a poorly operating school performs its function badly.