virtual memory



High Level Assembler(HLASM) for MVS & VM & VSE

virtual memory

Postby bobguo » Sat Apr 26, 2014 6:38 am

when abend happened, we referred to the dump and found that every program has its own EPA(entry point address), and as if all the programs ran within one 2G virtual memory. But many times, i was told every program ran in its own 2G virtual memory....
i thought if every program has its own 2G virtual memory, they maybe has the same addresses as each other. But i have not find it in the dump.
could you please explain it to me? thanks!
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Re: virtual memory

 

Re: virtual memory

Postby steve-myers » Sat Apr 26, 2014 9:01 am

Within one address space, which potentially has 2GB of addresses it can use, there may be (in fact always are) many programs. Some of the addresses are assigned to the nucleus, other addresses are assigned to the link pack area. There are often programs loaded in the Common Storage Area (CSA).

Your idea that every program has 2GB available to it is completely wrong.

AMODE 64 programs can, in fact, use more than 2 GB. I may be wrong about this, but I get the feeling that storage with virtual addresses > 4 GB is a single address range shared by all address spaces. Virtual addresses between 2 GB and 4 GB are not used.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: virtual memory

Postby Pedro » Tue Apr 29, 2014 5:19 am

Within one address space,... there may be (in fact always are) many programs.

For simplicity of understanding the concept, you can equate an "address space" to a TSO user, a batch job, or a started task. Each one will have its own address space.

As a TSO user, all of these programs you run have to share the same virtual storage. For example, you can split the screen and have multiple programs started, along with ISPF itself, and the TSO monitor program. I cannot count the number of times that a developer has come to me saying "there is a bug in Acme product, it abends', only to find out the program being developed is corrupting Acme's storage causing it to abend.

When you submit a batch job, the job runs in its own address space with its own virtual storage.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: virtual memory

Postby bobguo » Tue Apr 29, 2014 5:43 pm

can I understand it like this:
when one system which consists of many programs was running, maybe program1, program3 and program6 were located below the line, and the left were located above the line?
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Re: virtual memory

Postby bobguo » Tue Apr 29, 2014 7:04 pm

bobguo wrote:can I understand it like this:
when one system which consists of many programs was running, maybe program1, program3 and program6 were located below the line, and the left were located above the line?


what i really want to say is that within one 2G virtual memory, maybe program1, program3 and program6 were located below the line, and the left were located above the line...
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Re: virtual memory

Postby Pedro » Tue Apr 29, 2014 9:20 pm

were located below the line, and the <rest> were located above the line...

Actually, I have heard of two different terms (the line vs the bar):
Below the line: programs that need to be loaded using a 24 bit address.
Below the bar: programs that need to be loaded using a 31 bit address.
Above the bar: programs that are loaded using a 64 bit address.

The load modules (programs) self-identify their loading requirements through the use of the RMODE parameter during the link-edit process. The author of the program determines those settings. You can browse SYS1.LINKLIB and see a variety of combinations of RMODE and AMODE.

When you use any program, the system's loader will load them in the 2G virtual storage. And yes, some of them may be loaded below the line, others above the line, and still others will be loaded above the bar.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post