• Aucun résultat trouvé

DETERMINING SWAPPING SPACE ON THE PUBLIC STRUCTURE

Dans le document 'is respons~ble (Page 69-72)

I LOOP.CMD I

CHAPTER 4 CREATING STRUCTURES

4.7 DETERMINING SWAPPING SPACE ON THE PUBLIC STRUCTURE

Sections 4.7.1 and 4.7.2 describe what swapping space is and how to determine the amount of swapping space that you should allocate for your system.

4.7.1 What Is Swapping?

The number of user jobs that can fit into main memory simultaneously depends on the size of the individual jobs, the size of the memory-resident portion of the monitor, and the size of memory physically available. (Only a portion of the TOPS-20 monitor resides in main memory at one time.) If a user wishes to run a job that is not currently in memory, space must be provided. This may necessitate moving some other job out of memory. The user's program or data that is transferred out of memory is placed on disk in the swapping area.

The system sets aside a portion of the disk storage space on the public structure specifically for this purpose.

On some timesharing systems, a program must be entirely in main memory to execute. Swapping then consists of moving entire programs between disk and memory. Under TOPS-20, only portions of a program (those containing the instructions and data currently being referenced) need be in memory. Other portions of the program are brought into memory from disk as they are needed. In this case, swapping consists of moving portions of a program or data between disk and memory. The monitor decides which portions of which programs to swap, and when.

The size of a program is measured in a unit called a page. When swapping occurs, some of these pages are copied between memory and disk. Figure 4-5 illustrates the concept of swapping.

Figure 4-5: Swapping Concept

CREATING STRUCTURES

4.7.2 When to Increase Swapping Space

For the most part, the size of your swapping space depends on the cumulative size of jobs you estimate will be on the system at anyone time. Table 4-5 contains guidelines for estimating the amount of swapping space required for an approximate number of user jobs based on typical requirements. This amount is given in response to the question, "HOW MANY PAGES FOR SWAPPING?" in the software installation procedures.

The actual disk space used for swapping depends on the number of pages you give. The system rounds the number of pages given upward to an integral number of cylinders. The algorithm that follows Table 4-5 can be used to determine if the number of pages you choose for swapping space is the optimum number for the actual disk space used.

For example, the number 5500 may require an additional cylinder on the disk, whereas 5000 may give you the number of pages you require in the least amount of disk space. As you can see in the algorithm, the number you should choose also depends on the number of disk packs in the structure. The swapping space is divided equally among the disk packs in the public structure.

You can allow for swapping space on structures other than the public structure. However, this is necessary only if you plan to mount the structure as the public structure in the future. Allocating swapping space avoids re-creating the structure should you decide to mount it as the public structure.

All the monitors are designed to default to an appropriate number of pages for swapping. In most cases, you can take this default. The algorithm following Table 4-5 simply provides you with a means of checking that the default is sufficient for your particular system.

The guidelines in Table 4-5 apply to systems whose users perform many editing jobs and an average or small amount of debugging programs and production jobs. If your users perform a great number of debugging and production jobs and only a small amount of editing, you should

4-16

CREATING STRUCTURES

double the size of your swapping space. However, if you double the size of your swapping space, check the maximum swapping space allowed for the monitor you are running. (The

TQe§=gQ

~ MQg~! ~ !~§~~!!~~!Q~

Guide lists the maximum number of swapping pages you can use with each

;~~Itor.) You cannot exceed this maximum. If you enter a number that is larger than the maximum, the monitor uses the maximum allowed. If you must exceed the maximum, you can bring up a larger existing monitor, or you can. tailor your monitor by following the instructions in the BUILD.MEM file. This file is located in the saveset documentation files on the TOPS-20 Software Distribution tape.

Table 4-5: Determining Swapping Space

Estimated Number of Jobs

20 or less 21 to 30 31 to 40 41 to 50

Recommended Number of Pages for Swapping*

2500 3500 4500 5500

* For each additional 10 jobs, increase the number of pages for swapping by approximately 1,000.

Your estimate of the required number of pages for swapping is inserted as the value of X in the following algorithm:

X

=

the number of swapping pages you chose from Table 4-5

Y

=

the number of pages per cylinder (Y

=

95 pages for an RP04 or RP06).

Z =

the number of packs in a structure *Y

ACTUAL DISK SPACE FOR SWAPPING

= X

+

Z - 1

Z

(Note that this is integer arithmetic; do not cancel out any factors.)

The following example uses the system default number 10000 as the value of

X

(the number of swapping pages) and shows how much disk space will actually be allocated for a structure that is composed of two disk packs.

CREATING STRUCTURES

Example:

x =

default swapping space for monitor 2060-MONBIG. The default for monitor 2060-MONMAX is 15,000 pages.

Y

=

95

Z =

2 (packs in structure) *95

=

190 1)

2) 3)

Dans le document 'is respons~ble (Page 69-72)