We present an approach to analyzing the performance characteristics of TCP sessions in the presence of network routers which deploy the Random Early Detection (RED) mechanism with two "in" and "out" drop probability functions (RIO). We consider the case with a large number of TCP sessions which use token buckets for marking "in" and "out" packets at the entrance of the network. Under some simplifying assumptions we derive a set of equations that govern the evolution of these TCP sessions and the routers under consideration. We then solve these equations numerically using a fixed point method. Our analysis can capture characteristics of both RED and Tail Drop (TD) mechanisms in the RIO router. Our model is validated through simulations which show that less than 5% error is achieved in most cases. Various performance analyses are then carried out using this approach in order to study the impact of the RIO parameters on the performance characteristics of TCP sessions. Our results show that the loss probability threshold of "out" packets has a significant effect on the TCP throughput and on the average queue length. Setting this parameter consists in trading off between the network utilization and the fairness among TCP connections. Our results also show that Tail Drop mechanism is particularly suitable for "in" packets to satisfy various QoS constraints.