PHILADELPHIA — Money is so short at Feltonville School of Arts and Sciences, a public middle school here, that a nurse works only three afternoons a week, leaving the principal to oversee the daily medication of 10 children, including a diabetic who needs insulin shots. On the third floor filled with 200 seventh and eighth graders, one of two restrooms remains locked because there are not enough hall monitors. And in a sixth-grade math class of 33 students with only 11 textbooks to go around, the teacher rations paper used to print out homework equations.

“When you are given a loaf of bread, you have to make it last as long as you can,” said Michael Adelson, the math teacher. Feltonville serves 541 students, close to 80 percent of whom come from low-income families.

Such is the state of austerity across Philadelphia, where this fall, the schools almost did not open on time, and the district has eliminated 5,000 staff positions and closed 31 schools over the last two years. Feltonville alone has lost 15 teachers, two assistant principals, two guidance counselors, an office secretary, three campus police officers, 10 aides who supervised the cafeteria and hallways, and an operations officer, who oversaw most of the school’s day-to-day logistics.

With state education funding down 8 percent from 2011 and pension costs rising, the city and school district have searched desperately for new sources of revenue to close an $81 million deficit.