This thesis deals with two important and very timely aspects of the future power system operation - assessment of demand flexibility and advanced demand side management (DSM) facilitating flexible and secure operation of the power network. It provides a clear and comprehensive literature review in these two areas and states precisely the original contributions of the research.