Section 11.5
Review Questions

OS Modes and instructions

  1. What are the two modes that operating systems must provide in order to protect the system?
answer...
privileged mode and user mode
  1. What kind of hardware is needed to determine the current mode of the CPU?
answer...
an extra flip-flop
  1. Who can change the mode?
answer...
only a program running in privileged mode, usually the operating system
  1. Define trap.
answer...
an instruction that calls a subroutine in the operating system
  1. What term does IBM use for trap?
answer...
supervisor call
  1. List some of the tasks of an operating system.
answer...
  1. clean up after user programs
  2. initiate and monitor input and output
  3. change program characteristics
  4. send and receive messages between user programs
  5. create new programs
  1. What term do we use for a subroutine in the operating system that is meant to provide a service to user programs?
answer...
system cll
  1. If subroutines in the operating system are privileged, how does a user program ever call them?
answer...
the user program performs a trap instruction which tells the OS which system call to perform
  1. What does Unix call the user that has full privileges?
answer...
root
  1. Why is the CAL instruction dangerous is an otherwise secure computer system?
answer...
because it can specify absolutely any memory address as the beginning of a subroutine, but that memory address may be far enough into the program to bypass all security and parameter checking
  1. How is the TRP instruction different from CAL?
answer...
TRP specifies a system call number, but CAL specifies an address in memory
  1. What is abend a contraction of?
answer...
abnormal end
  1. What is the first thing that an operating system call does when it is called by a user program?
answer...
check the parameters and check security