There will be two groups of patients: One with a high risk for atelectasis and one with low risk for atelectasis. The patients are stratified by the type of surgery. Upper abdominal surgery with a duration of more than 2 hours has been shown to be an independent risk factor for atelectasis. Therefore, we chose to assign patients scheduled for abdominal surgery with an anticipated duration of surgery of more than 4 hours for the high-risk group. Patients with neurosurgical procedures with more than 4 hours will be assigned to the low risk group. In each patient the SpO2-oscillations will be measured at three different respiratory rates (RR). The rationale for this is that previous studies showed that cyclical recruitment and derecruitment is dependent on the RR.