Introduction to Computer Systems

Review these notes. For maximum benefit, go through these notes interactively, thinking about and answering the questions at the bottom of each page. These notes are an experiment in applying the "programmed learning" method to web-based computer aided instruction. The subject is Java Programming for beginning programmers. The content is intended to start beginning programmers out on the track to professional-level programming and reinforce learning by providing abundant feedback. Java is a programming language that is used often in professional practice.

Starting a Program

Answer:

The hard disk. The hard disk is used for long-term storage of all software, including the operating system.

 

Starting a Program

When a computer is first started, the hardware automatically loads the operating system and starts it running. This process is called booting. The reason for this odd term is that the operating system is itself involved in getting itself running—a process that is like someone "pulling themselves up by their bootstraps". Once the operating system is running, it is used to start up application programs.

Here is a (simplified) list of what happens when the user (you) starts up an application. Assume that the operating system (OS) is already running.

  1. The user asks to run an application.
    • This is done by clicking on an icon, making a menu choice, or by other means.
  2. The OS determines the name of the application.
  3. The OS finds the files on the hard disk where the application and its data are stored.
  4. The OS finds an unused section of main memory that is large enough for the application.
  5. The OS makes a copy of the application and its data in that section of main memory.
    • The software on the hard disk is unchanged; main memory holds a copy of what is on disk.
  6. The OS sets up resources for the application.
  7. Finally, the OS starts the application running.

As the application runs, the OS is there in the background managing resources, doing input and output for the application, and keeping everything else running.

 

Question 14:

When an application stops running, do you think that it is copied from main memory back to the hard disk?