Вы находитесь на странице: 1из 3

1. Consider a hypothetical 32-bit microprocessor having 32-bit instructions composed of two fields.

The first byte contains the opcode and the remainder an immediate operand or an operand address. a. What is the maximum directly addressable memory capacity (in bytes)? b. Discuss the impact on the system speed if the microprocessor bus has i) A 32-bit local address bus and a 16-bit data bus, or ii) A 16-bit local address bus and a 16-bit data bus. 2. The following figure illustrates that a process may be blocked and placed into the corresponding event queue due to waiting for an event of a specific type, but it suggests that a process can only be in one event queue at a time. a. Is it possible that you would want to allow a process to wait on more than one event at the same time? Provide an example.

Answer: Yes, it is possible that a process waits on more than one event at the same time. For example, a process may need to transfer data from one device to another. In this case, it may request both devices at once and wait until both are available for use. Another example is that a network application may wait on multiple sockets until data packets arrive at any of them.

3. Consider a 32-bit microprocessor, with a 16-bit external data bus, driven by an 8 MHz input clock. Assume that the microprocessor has a bus cycle whose minimum duration equals four input clock cycles. What is the maximum data transfer rate across the bus that this microprocessor can sustain in byte/s? To increase its performance, would it be better to make its external data bus 32-bit or to double the external clock frequency supplied to the microprocessor? State any other assumption you make and explain. Hint: Determine the number of bytes that can be transferred per bus cycle. 4. IN OS/2, what is commonly embodied in the concept of process in other operating systems is split into three separate types if entities: session, processes, and treads. A session is a collection of one or more process associated with a user interface (keyboard, display, mouse). The session represents an interactive user application, such as a word processing program or a spreadsheet. This concept allows the personal-computer user to open more than one application, giving each one or more windows on the screen. The OS must keep track of window, and therefore which session, is active, so that keyboard and mouse input are routed to the appropriate session. At any time, one session is in foreground mode, with other sessions in background mode. All keyboard and mouse input is directed to one of the processes of the foreground session, as dictated by the applications. When a session is in foreground mode, a process performing video output sends it directly to the hardware video buffer and thence to the users screen. When the session is moved to the background, the hardware video buffer is saved to a logical video buffer for that session. While a session is in background, if any of the treads of any of the processes of that session executed and produces screen output, that output is directed to the logical video buffer. When the session returns to foreground, the screen is updated to reflect the current contents of the logical video buffer for the new foreground session. There is a way to reduce the number of process-related concepts in OS/2 from three to two. Eliminate session, and associate the user interface (Keyboard, mouse, screen) with processes. Thus one process at a time is in foreground mode. For further structuring, processes can be broken up into threads. a. What benefits are lost with this approach? b. Is you go ahead with this modification, where do you assign resources (memory, file, etc.): at the process or tread level?

5. A multiprocessor with eight processors has 20 attached tape drivers. There is a large number of jobs submitted to the system that each requite a maximum of four tape drives to complete execution. Assume that each job starts running with only three tape drives for a long period before requiring the fourth tape drive for a short period toward the end of its operation. Also assume an endless supply of such jobs. a. Assume the scheduler in the OS will not start a job unless there are four tape drives available. When a job is started, four drives are assigned immediately and are not release until the job finished. What is the maximum number of jobs that can be in progress at once? What are the maximum and minimum number of tape drives that may be left idle as a result of this policy? b. Suggest an alternative policy to improve tape drive utilization and at the same time avoid system deadlock? What is the maximum number of jobs that can be in progress at once? What are the bounds on the number of idling tape drives?

Вам также может понравиться