Defaults arising from illiquidity can lead to private workouts, formal bankruptcy proceedings or even liquidation. All these outcomes can result in deadweight losses. Corporate illiquidity in the presence of realistic capital market frictions can be managed by a) equity dilution, b) carrying positive cash balances, or c) entering into loan commitments with a syndicate of lenders. An efficient way to manage illiquidity is to rely on mechanisms that transfer cash from "good states" into "bad states" (i.e., financial distress) without wasting liquidity in the process. In this paper, we first investigate the impact of costly equity dilution as a method to deal with illiquidity, and characterize its effects on corporate debt prices and optimal capital structure. We show that equity dilution produces lower firm value in general. Next, we consider two alternative mechanisms: cash balances and loan commitments. Abstracting from future investment opportunities and share re-purchases, which are strong reasons for corporate cash holdings, we show that carrying positive cash balances for managing illiquidity is in general inefficient relative to entering into loan commitments, since cash balances a) may have agency costs, b) reduce the riskiness of the firm thereby lowering the option value to default, c) postpone or reduce dividends in good states, and d) tend to inject liquidity in both good and bad states. Loan commitments, on the other hand, a) reduce agency costs, and b) permit injection of liquidity in bad states as and when needed. Then, we study the trade-offs between these alternative approaches to managing corporate illiquidity. We show that loan commitments can lead to an improvement in overall welfare and reduction in spreads on existing debt for a broad range of parameter values. We derive explicit pricing formulas for debt and equity prices. In addition, we characterize the optimal draw down strategy for loan commitments, and study its impact on optimal capital structure.