
For an example of one man who was considering knee surgery but lost fifty pounds in twelve weeks instead (via a change in diet and exercise) and cured his knee pain, see a previous post here on Michael Becker.
Your doctor would be the best person to consult about this, but I would think that before opting for knee joint surgery, most people should probably consider weight loss (if overweight), increased appropriate exercise, glucosamine and/or the wearing of an unloading knee brace.
Unloading braces ('valgus knee braces') were developed about ten years ago and are often recommended to people who have knee pain due to osteoarthritis. To the extent that they can help reduce pain they can also be used by people who want to exercise in order to lose weight but find it too painful to do so because of knee pain.