CS3331 Reading List: Week 2

Course Material
Slides used in class are available in the common directory with filenames 02-Hardware-OS.pdf and 03-Process.pdf.
If you wish to print these slides, print them double-sided and print as many slides as possible on the same page. Let us save a tree!

Programming Material
None for this week

Homework Assignment
Answer the following questions: Answers to these questions can be found in the above mentioned slides.
  • What is a CPU mode?
  • What is the dual-mode execution?
  • What is a privileged instruction? Why are privileged instructions needed?
  • What is an atomic instruction? Why are atomic instructions needed? What would happen if multiple CPUs/cores execute their atomic instructions?
  • What is an interrupt, and what is a trap?
  • Which one of the following event is an interrupt/trap? Why?
    • Real time clock goes off
    • A keypress
    • A segment fault
    • A modem dial-up call
    • Floating-point exception
    • Accessing an area not belonging to your program
    • The completion of an I/O
    • In virtual memory accessing a page that is not in the physical memory
    • A system call
    • An memory parity error
  • What does it mean by interrupt-driven?
  • Explain the steps the hardware and the operating system will do when an interrupt occurs.
  • What is a system call?
  • Why is an interval timer needed?
  • What is a process?
  • How process space is allocated?
  • What are process states?
  • Draw the process state diagram and elaborate EVERY state and EVERY transition.
  • MUST DO PROBLEM: Write a program in which you use long to compute the factorials of 1!, 2!, 3!, ..., 25!. Print all results and check to see if integer operations would cause integer overflow. What odd things could happen?
We do not collect your practice work; but, similar problems will appear in quizzes and exams in the future. Note that I will not make any announcement in class for these short quizzes. In other word, short quizzes may take place at any time as long as I see it is appropriate.