  The increasing traffic demand in cellular networks has recently led to the
investigation of new strategies to save precious resources like spectrum and
energy. A possible solution employs direct device-to-device (D2D)
communications, which is particularly promising when the two terminals involved
in the communications are located in close proximity. The D2D communications
should coexist with other transmissions, so they must be careful scheduled in
order to avoid harmful interference impacts. In this paper, we analyze how a
distributed context-awareness, obtained by observing few local channel and
topology parameters, can be used to adaptively exploit D2D communications. We
develop a rigorous theoretical analysis to quantify the balance between the
gain offered by a D2D transmission, and its impact on the other network
communications. Based on this analysis, we derive two theorems that define the
optimal strategy to be employed, in terms of throughput maximization, when a
single or multiple transmit power levels are available for the D2D
communications. We compare this strategy to the state-of-the-art in the same
network scenario, showing how context awareness can be exploited to achieve a
higher sum throughput and an improved fairness.
