Review for COMP 310 Midterm

Review for COMP 310 Midterm - Review Midterm 1 Introduction...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Review - Midterm 1: Introduction OS: program, between user and hardware goals: execute user programs, solve user problems make computer convenient to use use hardware efficiently allocates resources fairly and efficiently controls execution of programs to prevent errors, etc 4 components of a computer system hardware: computing resources OS: controls, coordinate hardware use application programs users kernel: one program always running; everything else = system/application program monolithic: put as much as possible in the kernel; used by windows and  GNU/linux microkernel: put as little as possible in the kernel, have everything else run in user space; used by Mac OS (Linus Torvalds thinks this is dumb) bootstrap program: stored in ROM/EPROM, aka firmware (and not RAM, because RAM  is volatile, lol) loads kernel, begins its execution; bootstraps everything else computer system organisation CPUs and device controllers compete for access to shared memory, using a  common bus I/O devices and CPUs can execute concurrently each device controller is responsible for a particular device (or multiple devices,  e.g., disks), has a local buffer data is first stored in controller's local buffer CPU moves data between local buffers and main memory when device controller is done, it causes an interrupt to let the CPU know CPU looks up memory address of the relevant interrupt handler (aka  interrupt service routine) based on the type of interrupt, using the interrupt vector  table the address and PC of instruction that is currently being interrupted is  saved (along with registers) control is transferred to interrupt handler incoming interrupts are ignored to prevent a lost interrupt once the interrupt handler has completed, returns to previous instructions  (return address, flags popped from stack - what flags?) trap: software-generated interrupt (caused by error or user request) interrupts form the basis of modern operating systems
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
interrupt timeline diagram, explained in words: at first, CPU is executing user process then, I/O device receives data, takes some time to complete the transfer once the transfer is complete, CPU processes the interrupt; I/O device is  idle again CPU returns to executing user process I/O device remains idle until another I/O request occurs - repeat the  process System call: request to OS, user waits for I/O completion Device status table: comtains type, address and state for each I/O device
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern