Software Systems Spring 2005 For today, you should have: 1) worked on your project 2) read Database System Implementation and answered reading questions Outline: 1) quiz 2) database implementation 3) journaling file systems 4) project time For next time you should: 1) work on your project 2) read Silberschatz and Galvin, I/O Systems, and answer reading questions The mode bit ------------ One of the goals of the operating system is mutual protection, which means that applications should not be able to interfere with each other or the OS. What are some of the things we need to prevent applications from doing? All modern processors provide a MODE BIT, which indicates whether the code that is currently running is in KERNEL MODE (aka supervisor mode) or USER MODE. In kernel mode, anything is possible, but in user mode there are instructions you can't execute. If you try, it causes a TRAP (aka software interrupt). How/when does the mode bit switch from kernel to user? How/when does it switch from user to kernel? Reading Questions ----------------- This chapter sits at the boundary between Operating Systems and Computer Architecture. If you have not taken CompArch, there might be some unfamiliar concepts. Come with questions! Silberschatz and Galvin, pp 397-409 1) What is the primary purpose of a device driver? 2) What's the difference between a port and a bus? 3) What is a controller? 4) What are the two ways a processor interacts with a controller? 5) What is the primary disadvantage of polling? 6) What does it mean to say that a device raises an interrupt, and what happens? 7) What is a maskable interrupt? 8) What is interrupt chaining and why is it necessary? 9) What's the difference between and exception and an interrupt? 10) What is a trap? 11) What is DMA? 12) What does it mean to say that a device is bus-mastering? On the next page, read the section titled "Evolution of the I/O Function."