Writing a thesis is more a matter of personal style than a matter of guidelines. Thus, no rigid guidelines can be given to make your decision of how to structure your thesis easier. Remember, it is your thesis after all, and at the graduate level you are expected to show leadership ability and not just ask for instructions. Then it is you who must defend it. So the following is one suggested structure but it may not always be suitable depending on the particular topic and content. The main parts suggested are:
Abstract: Set the stage by stating the goal and the major developments/contributions in non-highly-technical terms so that the reader has an idea of what to expect and where the emphasis is. In other words say in simple words and in summary what the thesis is all about.
Introduction: Give the rationale behind the topic. Why is the topic significant? Why does it have sufficient depth (to justify the degree you are seeking)? What are the difficulties? What are the inherent problems? (In this section you should be talking about the problem in itself and not in conjunction with a specific solution).
Problem Formulation: In this section you state your problem in technical terms and express it formally (like in terms of math). This is needed in order to express your problem and its boundaries in unambiguous terms. You express the constraints and various pertinent assumptions that set the boundaries of your problem space, its solutions, and its applicability. Remember that this sets the criteria on which your thesis will be judged and evaluated.
Background: Discuss the properties and behavior of existing methods. Do a preliminary critique. Explain what is not satisfactory in the existing methods and why you set out for a new method. You must give sufficient information about the properties of other methods because you must write under the assumption that those interested in the document of your thesis may not be experts in the field. But you should not extend to unnecessary detail, or inflate this section artificially to produce bulk. Bulk will not earn you anything, it annoys reviewers, and it will not fool them. Give complete references to existing material. Be carefull about plagiarism, it is never acceptable.
Your Approach: Here you lay out all the work you have accomplished in a logical sequence. You provide your solution in technical detail. This should normally be the biggest section. You have to be very analytical and not hold anything back. Anyone should be able to recreate your results on the basis of the contents of this section. This should be technical, complete, and should flow in a logical sequence.
Evaluation/Assessment: Discuss the advantages and disadvantages of your solution. Provide all the measures or evaluation you came up with. Provide all the results of simulations, tests, and any other scheme of assessment. Discuss the limitations.
Discussion: Provide a qualitative and quantitative comparison to the other approaches. Take a good look at it as a whole. Relative advantages/disadvantages and limitations (as compared to other works) should be discussed here.
Further open problems: Where does this subject go from here? What new grounds and questions are opened? What new ideas are created that could be the subject of further research? If anyone wanted to pursue further the approach that you took, then what kind of things would he consider further?
Conclusion: In this section you should basically answer the question "why do I deserve my Ms/PhD degree?" Review the contributions of the thesis. What are the original new items in the thesis? what is the significance of these contributions?
References: Be respectful of other people's work and provide references to it. This complements to a great extent the background section and provides further reading on all the parts that you have used and which have been developed by others.
Note that some topics warrant a different order in the appearance of these sections. For example, depending on the topic it may be more appropriate to give the formulation before the background, if the referencing of this background needs definitions that you plan to include in your formulation.