11-15-2014, 03:54 PM
Question#1:
Which of the following instructions should be privileged?
a. Set value of time.
b. Read the clock.
c. Clear memory.
d. Issue a trap instruction.
e. Turn off interrupts.
f. Modify entries in device-status table.
g. Switch from user to kernel mode.
h. Access I/O device.
Answer:
The following operations need to be privileged: Set value of timer, clear memory, turn off interrupts, modify entries in device-status table, access I/O device. The rest can be performed in user mode.
Explanation:
Which of the following instructions should be privileged? why or why not
a) Switch from user to kernel mode
Unprivileged because it's how applications invoke system calls.
The catch is the application cannot control where the program counter goes when this switch happens.
b) Read the clock
Unprivileged, every process should be able to read the clock.
c) Turn off interrupts
Privileged so that a process cannot monopolize the CPU
Question#2: Some computer systems do not provide a privileged mode of operation in hardware. Consider whether it is possible to construct a secure operating system for these computers.
Give arguments both that it is and that it is not possible.
Answer:
An operating system for a machine of this type would need to remain in control
(Or monitor mode) at all times. This could be accomplished by two methods:
1). Software interpretation of all user programs (like some BASIC APL, and LISP systems, for example) the software interpreter would provide, in software, what the hardware does not provide.
2). require meant that all programs be written in high-level languages so that all object code is compiler-produced. The compiler would generate (either in-line or by function calls) the protection checks that the hardware is missing.
Which of the following instructions should be privileged?
a. Set value of time.
b. Read the clock.
c. Clear memory.
d. Issue a trap instruction.
e. Turn off interrupts.
f. Modify entries in device-status table.
g. Switch from user to kernel mode.
h. Access I/O device.
Answer:
The following operations need to be privileged: Set value of timer, clear memory, turn off interrupts, modify entries in device-status table, access I/O device. The rest can be performed in user mode.
Explanation:
Which of the following instructions should be privileged? why or why not
a) Switch from user to kernel mode
Unprivileged because it's how applications invoke system calls.
The catch is the application cannot control where the program counter goes when this switch happens.
b) Read the clock
Unprivileged, every process should be able to read the clock.
c) Turn off interrupts
Privileged so that a process cannot monopolize the CPU
Question#2: Some computer systems do not provide a privileged mode of operation in hardware. Consider whether it is possible to construct a secure operating system for these computers.
Give arguments both that it is and that it is not possible.
Answer:
An operating system for a machine of this type would need to remain in control
(Or monitor mode) at all times. This could be accomplished by two methods:
1). Software interpretation of all user programs (like some BASIC APL, and LISP systems, for example) the software interpreter would provide, in software, what the hardware does not provide.
2). require meant that all programs be written in high-level languages so that all object code is compiler-produced. The compiler would generate (either in-line or by function calls) the protection checks that the hardware is missing.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
