When I taught in New Mexico, we had all of the eighth and ninth graders in the city. It was the largest junior high in the state---1200 adolescents and a few dozen adults managing things as best we could. Why the kids never realized that they outnumbered us by far and took over the school is still a mystery to me.
The ninth graders were earning high school credits and, in theory, they were supposed to have a certain number of these before moving up to the high school. There was a flaw in this plan, however: some students were becoming perpetual ninth graders. More often than not, it was due to poor skills, but some kids preferred to flunk and hang around to deal drugs to the new crop of kids each fall. It was finally determined that if a student was 17, they had to go to the high school---credits or no credits. (And yes, there were 17 year old freshmen each year.)
I was reminded of this when reading an article in the Washington Post about a DC area school which is experiencing something very similar. Due to a confluence of factors, they are finding out that 17 year old boys don't belong in the same school with 12 year old girls...especially when some of those are students from the local juvenile detention facility. (We had the same deal in Carlsbad.) To its credit, however, the DC school has managed to make a lot of positive changes in its organization and delivery of instruction. It may be that the age vs. credit dilemma will always be part of the public school system. We just need to keep looking for solutions.