A new type of data processing has been introduced in recent years, that is different from the data processing performed by common database management systems. This type of data processing that is performed on streams of data is called data stream processing. A data stream is a sequence of probably infinite number of data elements which are produced by a data source. Queries that are issued on data streams must continuously be evaluated by the stream processing system, hence they are called “continuous queries”. Because of the inability to store all data received from a stream, the system cannot evaluate queries over the whole history of data, so users must limit the range of data elements on which queries will be evaluated by specifying a window on them. Sliding windows, which are the most common types of windows, are periodically advanced over data streams after arrival of some new data elements or after a specified time. When a sliding window slides, the system must evaluate queries that have been defined on it. In this research we proposed some efficient algorithms for management of different types of sliding windows, especially in large-scale data stream management systems with high input rates and large number of users or continuous queries. The applications of sensor networks, which are one of the main sources of data streams, have been increased in recent years. With the increasing growth of sensor network usage the collection and integration of data from heterogeneous sensor networks and distributed processing of continuous queries over these data have become a new challenge. Therefore, we need systems that provide dynamic management and integration of sensor networks. GSN (Global Sensor Networks) is one of these systems and its function is to provide a general system for integration and management of any type of sensor networks. In this work a sliding window management subsystem is designed and implemented based on the proposed algorithms. Many of the features of a data stream processing system are also modeled on common database management systems, since they are not equipped to store and process streaming data.