Section 11.5
Review Questions
OS Modes and instructions
-
What are the two modes that operating systems must provide in order to
protect the system?
answer...
privileged mode and user mode
-
What kind of hardware is needed to determine the current mode of the CPU?
answer...
an extra flip-flop
-
Who can change the mode?
answer...
only a program running in privileged mode, usually the operating system
-
Define trap.
answer...
an instruction that calls a subroutine in the operating system
-
What term does IBM use for trap?
answer...
supervisor call
-
List some of the tasks of an operating system.
answer...
- clean up after user programs
- initiate and monitor input and output
- change program characteristics
- send and receive messages between user programs
- create new programs
-
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
-
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
-
What does Unix call the user that has full privileges?
answer...
root
-
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
-
How is the TRP instruction different from CAL?
answer...
TRP specifies a system call number, but CAL specifies an address in
memory
-
What is abend a contraction of?
answer...
abnormal end
-
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