Operating System Overview

发布时间 2023-06-13 16:06:51作者: 月明水长

Computer System Overview

1.1What are the three main purposes of an operating system?
(1) Interface between the hardware and user;
(2) manage the resource of hardware and software;
(3) abstraction of resource;

1.2 List the four steps that are necessary to run a program on a completely dedicated machine.
Preprocessing > Processing > Linking > Executing.

1.3: In general terms, what are the four distinct actions that a machine instruction can specify?

These actions fall into four categories:

  1. Processor-memory: Data may be transferred from processor to memory or from memory to processor.
  2. Processor-I/O: Data may be transferred to or from a peripheral device by transferring between the processor and an I/O module.
  3. Data processing: The processor may perform some arithmetic or logic operation on data.
  4. Control: An instruction may specify that the sequence of execution be altered.

1.4: What is an interrupt?

An interrupt is a mechanism by which other modules (I/O, memory) may interrupt the normal sequencing of the processor.

1.5: How are multiple interrupts dealt with?

Two approaches can be taken to dealing with multiple interrupts. The first is to disable interrupts while an interrupt is being processed. A second approach is to define priorities for interrupts and to allow an interrupt of higher priority to cause a lower-priority interrupt handler to be interrupted.

1.6: What characteristics distinguish the various elements of a memory hierarchy?

The three key characteristics of memory are cost, capacity, and access time.

1.8: What is the difference between a multiprocessor and a multicore system?

A multicore computer is a special case of a multiprocessor, in which all of the processors are on a single chip.

Operating System Overview

2.1: What are three objectives of an OS design?

  1. Convenience: An operating system makes a computer more convenient to use.
  2. Efficiency: An operating system allows the computer system resources to be used in an efficient manner.
  3. Ability to evolve: An operating system should be constructed in such a way as to permit the effective development, testing, and introduction of new system functions without interfering with service.

2.2: What is the kernel of an OS?

The kernel is a portion of the operating system that includes the most heavily used portions of software. Generally, the kernel is maintained permanently in main memory. The kernel runs in a privileged mode and responds to calls from processes and interrupts from devices.

2.3: What is multiprogramming?

Multiprogramming is a mode of operation that provides for the interleaved execution of two or more computer programs by a single processor.

2.4: What is a process?

A process is a program in execution. A process is controlled and scheduled by the operating system.

2.5: How is the execution context of a process used by the OS?

The execution context, or process state, is the internal data by which the operating system is able to supervise and control the process. This internal information is separated from the process, because the operating system has information not permitted to the process. The context includes all of the information that the operating system needs to manage the process and that the processor needs to execute the process properly. The context includes the contents of the various processor registers, such as the program counter and data registers. It also includes information of use to the operating system, such as the priority of the process and whether the process is waiting for the completion of a particular I/O event.

2.8: Describe the round-robin scheduling technique.

Round robin is a scheduling algorithm in which processes are activated in a fixed cyclic order; that is, all processes are in a circular queue. A process that cannot proceed because it is waiting for some event (e.g. termination of a child process or an input/output operation) returns control to the scheduler.

2.10: What is multithreading?

Multithreading is a technique in which a process, executing an application, is divided into threads that can run concurrently.