Answers to

Test #1

CIS343 - October 16, 2002

 

(1-4) List the four basic machine elements:

1.

2.

3.

4.

    Processor

    Main memory

    I/O modules

    System bus

 

Identify these special purpose registers:

5. The register containing the address of the next instruction to be executed is the . . .

        Program Counter (PC)

6. The register containing the instruction being executed is the . . .

        Instruction Register (IR)

 

(7-15) Complete the description of the 9 steps  of interrupt processing.

7. A device issues _____ to the processor.

        an interrupt signal

8. The processor _____ execution of the current instruction.

        completes

9. The processor _____.  If there is one, it sends an acknowledgement to the device.

        tests for an interrupt

10. The processor pushes the ___ onto the system stack.

        PSW and PC

11. The processor loads the address of _____ into the PC.

        the interrupt handler

12. The interrupt handler saves information critical to the _____, such as the contents of the registers.

        running program

13. The _____ is processed.

        interrupt

14. The saved _____ are retrieved and restored.

        register values

15. The _____ and the PC are restored.  Execution of the program resumes.

        PSW

 

The goals of two level organization of memory:

16. Performance goal: have overall memory speed approach that of _____.

        fast memory

17. Cost goal: have _____ of combined memory be close to that of the slower, cheaper memory.

        average cost per bit

 

(18-20) List the three steps of the Fetch-Execute Cycle.

18.

19.

20.

          Fetch instruction pointed to by PC

        Increment PC by instruction size

        Decode & execute instruction

 

21. What does it mean to “fetch” an instruction?

          Copy it from RAM to IR

 

22. During program execution, how is a jump or a branch accomplished?

          Address in the PC is changed

 

23. The lowest level instructions that directly control a microprocessor is called . . .

          microcode

 

(24-30) Identify these stages in the development of operating systems.

24. Several jobs are read into memory, allowing the processor to switch back and forth them.

        Multiprogrammed batch systems

25. The scheduling and loading functions were turned over to a program called the monitor.  Jobs were grouped together and run in batches.

        Simple batch systems

26. Computers did not have software.  To reprogram the machine required rewiring.            Prehistory

27. A user on a PC runs several processes at once.

        Single user multiprogramming

28. The user was given interactive access to the machine via a command line interface. 

        Interactive multiprogramming

29. A computer operator was put in charge of the machine.

        Operator controlled machines

30. User time was scheduled.  Users had to load their programs along with system software needed by their job.

        User setup and breakdown

 

31. T/F:  Many programs exhibit a low degree of locality.  OS designers work to teach programmers how to write code with higher level of locality.

        False

 

32. T/F:  To be useful in OS design, clustered memory references must take place within a short time frame.

        True

 

(33-36) Identify these hardware features of modern operating systems.

33. Facilitates the OS relinquishing and regaining control of the processor.

          Interrupt

34. Can be used to prevent a single job from monopolizing the system.

          Timer

35. Detect attempts by user program to write to OS area of memory.

          Memory protection

36. Does not allow user program to execute the full set of machine instructions.

          Privileged instructions

 

37-39. Name the three components that comprise a process

                        executable program; associated data; execution context

 

(40-42) Identify the three major lines of computer system development which gave rise to problems in timing and synchronization.

40. Processor is switched among various programs residing in memory.

            Multiprogramming

41. Support many users simultaneously.

            General-purpose time sharing

42. Online entry of queries and updates against a database.

            Real-time transaction processing

 

(43 - 45) Identify these goals of a resource allocation and scheduling policy

43. Maximize throughput, minimize response time, accommodate as many users as possible.

          Efficiency

44. Give all processes approximately equal access to resources.

          Fairness

45. Discriminate among different classes of jobs with different service requirements.

          Differential responsiveness

 

46. The portion of the OS which contains the most frequently-used functions and which resides in main memory is known as the...

          kernel

 

(47-52) Identify the process states described below:

47. The process cannot execute until some event occurs.

Blocked

48. The process is in secondary memory and is available for execution (as soon as it is loaded into main memory).

Ready, suspend

49. The process has been released from the pool of executable processes.

Exit

50. The process is currently being executed.

Running

51. The process has been created but has not yet been admitted to the pool of executable processes.

New

52. The process is in secondary memory and awating an event.

Blocked, suspend

53. The process is prepared to execute.

Ready

 

(54-64) Identify the state transitions triggered by these types of events.

54. Event process is waiting for occurs

          Blocked Þ Ready

55. A new process is created to execute a program

          Null Þ New

56. Process’s quantum has expired

          Running Þ Ready

57. OS is prepared to take on an additional process

          New Þ Ready

58. Process voluntarily gives up the processor

          Running Þ Ready

59. Time to select a new process to run

          Ready Þ Running

60-61. Child process is terminated by parent process (2 answers)

          Blocked Þ Exit

          Ready Þ Exit

62. OS preempts a process for one of higher priority

          Running Þ Ready

63. Process requests something it must wait for

          Running Þ Blocked

64. Process has completed or it aborts

          Running Þ Exit

 

65. The data needed by the OS to control a process is contained in the ...

process control block

 

(66-68) Identify these mechanisms for interrupting the execution of a process:

66. An error or exception condition is generated by the process

          trap

67. Process requests on OS service

          supervisor call

68. Due to an event, such as completion of I/O operation, that is external

          to the process

          interrupt

 

69. Give a definition of process.

                        A program in execution

 

70-75. Draw the diagram of the 5-state process model, labeling all the nodes and arcs.

{Use letters from the Word Bank for labeling}

See Stallings Fig. 3.5, p. 115

New

Ready

Running

Exit

Blocked

Admit

Dispatch

Time-out

Release

Event Wait

Event Occurs