Background and objectives: morbidly obese patients are characterized by a high prevalence of restrictive lung disease. Respiratory mechanics are significantly altered in obesity. These changes are exacerbated with general anesthesia .Obesity also results in reduced lung and chest wall compliance ,increased lung resistance ,reduced oxygenation.MgSo4 is promising in managing several respiratory disorders.it cause smooth muscle relaxation and reduce airflow obstruction.~The objective of this trial is to study the effect of mgso4 infusion on oxygenation and lung mechanics in morbidly obese patients undergoing bariatric surgery.~the following will be recorded :intraoperative oxygenation,lung mechanics,MAP,HR,EtCO2,plateau and peak airway pressure,sedation score,serum mgso4 level,change in P/F ratio and dynamic lung compliance,respiratory rate postoperative
The purpose of this trial is to study the effect of mgso4 infusion on oxygenation and lung mechanics in morbidly obese patients undergoing bariatric surgery