I have dealt with both, but when the season is really, really busy, like this year, you have to be at the office closest to the trailhead. I have not done this in 2 years, so the park may have improved the system(Ya right with the tremendous amount of money they have I am sure it has been fixed

) But if you go into Big Oak Flat and try to get a permit for Ten Lakes, they call the Toulumne Meadows office to procure the spot. If the office doesn't answer, you may be out of luck.
However, I am really surprised at some of the trailheads that aren't full.
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CB8QFjAA&url=http%3A%2F%2Fwww.nps.gov%2Fyose%2Fplanyourvisit%2Fupload%2Ffulltrailheads.pdf&ei=iPDJU4XGH8qKyATP2YCYCw&usg=AFQjCNG2x8UxDzST2hv9sImvZn4aVrBYiA&bvm=bv.71198958,d.aWwThis a PDF that you download.
My advice is to get to the closest office to the trailhead you want to take.
August 17th will be a bit easier to get something as most of the weekenders are heading home.
Ten Lakes is amazingly empty in August. I have never seen that before. I have had a heck of a time getting in there on a weekend, in previous years.
So to answer the OP's question, study the above link for trailheads. You might find one open for a reservation. Check out the open one for your date to start, and ten come back and ask us what we know about it. Chances are very high we have all been down the trail and can make recommendations.