Operating Systems, Study Sheet  

September 5 Test; MATERIAL COVERED Chapter #1 Slides

 

1.  The operation of a computer CPU can be described in terms a simple loop, where each time through the loop one instruction is executed. The basic process in executing instructions never varies.

2.                 The loop:

a.                    An instruction is fetched from the memory location specified by the special register called the program counter.

b.                   The instruction is placed in a special register called the instruction register.

c.                    The program counter is incremented so it points to the next instruction to be executed.

d.                   The instruction is decoded to determine what action is to be performed. The action is specified by the instruction’s opcode (operation code) bits.

 

3.  A trap is caused by the program and is synchronous with it. An interrupt is asynchronous.  If the program is run again and again, the trap will always occur at the same instruction. An interrupt is caused by an external event and its timing is not reproducible.

 

4.                 To provide an OS with privileges that are not granted to application programs, the hardware must support multiple modes of execution: Most commonly these are the kernel mode and the user mode.

5.  Attempts to perform certain activities while in user mode will result in a trap. The restricted activities consist of those things normally reserved for the operating system such as execution of privileged instructions.

6.                 The tasks performed by an operating system can be divided into four areas:

a.     Process Management

b.    Memory Management

c.     File System Management

d.    Device Management

7.                       The two main functions of an operating system may be described as

a.                    Providing users (applications) with an extended machine.

b.                   Managing system resources

8.     The CPU is really “busy” even if there are no          processes to run.  If nothing else, the OS executes in a loop that does nothing (called busy-waiting loop or idle loop).  When an interrupt occurs the CPU resumes usual operations.

 

9.  When the power of a computer is first turned on, the contents of memory is undefined.  The boot program in ROM must read the code from the boot device to load into memory.

10                        Define applicable time periods (years) for the 1st, 2nd, 3rd, and 4th generations of operating systems.

11.                       Arrange the following memory types in order of most expensive to less expensive.

                      disks

                      memory Registers

                      CPU Cache

                      Tapes

                      RAM

12.                       On early computers, every byte of data read or written was directly handled by the CPU (i.e., there was no DMA). What implications does this organization have for multiprogramming?

13.        When a process is temporarily suspended it must later be started in the same way that it was stopped, to do this, all the information about the process is saved during the suspension. In OS, all this is done in an OS table called the process table. The content of the process table is used to restart a suspended process in the same state it was in when it was suspended. (This relates to Exercise #16 on page 69 of the text.)

14.        If the call count = write(fd, buffer, nbytes) fails, (E.g., if fd is incorrect), the call can return -1. On a correct termination it always returns nbytes.

15.        The kernel is the actual operating system, a single large program that always resides in memory.

16.                                      Attaching the file system on a floppy disk to the root file system:

        

        The above shows the file system before the mount call.  Draw a sketch illustrating how the system may appear after the mount call.

 

 

 

 

 

 

 

 

17.                                      What is the system call that creates a process in the UNIX system? 

18.                                      How many bytes are in a 1-TB memory?

19.                                      What is a UNIX shell?

20.                                      In UNIX, what does a system call do?

21.                                      In what ways does caching improve performance?

22.                                      Problem 9, page 68.

23.                                      Problem 10, page 68.

24.                                      To distinguish between the parent and child processes resulting from the UNIX fork command, the return value from fork is zero for the child, and nonzero for the parent. (or undef if the system call fails).

25.                                      Three of the common system calls used to create and manage processes are fork, wait, and exec.

                                fork is used to create processes,

                                wait is used to wait for a process to exit,

                                exec is used to load a different process image in the child.

26.                                      A process is terminated in UNIX when the process executes the last statement (exit).

                                (a)    What happens to output data when this termination occurs?

                                (b)    What happens to the resources that were allocated to the process?

27.   When the timesharing VM/370 system was developed, what are two characteristics that were provided?

28.    If there is no window manager available, what must be used to accomplish anything in UNIX?

29.   Problem 19, page 69.

30.   Problem 20, page 69.

 


Make a Free Website with Yola.