setmemwindow man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

setmemwindow(1M)					      setmemwindow(1M)

NAME
       setmemwindow  - change window ID of running program or start program in
       particular memory window

SYNOPSIS

	      WinId] { | program [arg]... }

DESCRIPTION
       is the command that changes the window  ID  of  a  running  process  or
       starts a specified program in a particular memory window.

       If  the option is specified with a nonzero pid, only the process's win‐
       dow ID is changed, and any value specified for program is ignored.

       The executable program is only executed if the process ID pid is either
       or unspecified.

       Changing	 the  window  ID  for  the  running  process does not mean the
       process immediately attaches to or creates objects using	 that  window.
       The  targeted process does not begin using the window until it executes
       a new image.

       used as a wrapper for an existing executable, starts the program in the
       desired (see option below) memory window.  In order to execute program,
       changes the window ID, forks a child and executes program in the	 child
       process.	  The  default	behavior of is to wait until program finishes.
       If is specified, the waiting for program is bypassed and exits  immedi‐
       ately after forking the child.

       If  and	are  unspecified, the default behavior is to place the process
       into the window specified by WinId.  If WinId exists, then the  process
       is  placed into that memory window.  If no window exists with WinId, an
       unused window is allocated and associated with  WinId.	specifies  the
       creation	 of  a window.	If the window already exists and is specified,
       the call fails.	specifies the joining to an existing window.   If  the
       window does not exist and is specified, the call fails.

       The  option  instructs the command to execute program even if is unable
       to change the process's window to the specified WinId.  The failure  to
       create  a  specific  window  may be the effect of the lack of available
       memory windows; that is, the underlying kernel:

	 ·  Has not been configured with enough memory windows (exit status

	 ·  Was unable to allocate memory  for	a  new	window	to  meet  this
	    request (exit status or

	 ·  Does not implement the feature (exit status

   Options
       Create a memory window where both memory window quadrants use
		      the  same	 space ID.  For executables this generates two
		      quadrants with the same space ID.	 Applications can  use
		      this  to	generate  the  appearance of larger contiguous
		      shared memory ranges with a maximum of 2 gigabytes.  For
		      example,	an  application	 that  generates  a 1 gigabyte
		      shared memory segment has that segment placed  into  the
		      2nd  quadrant  by	 default.   If the application creates
		      another 1 gigabyte segment that segment is placed in the
		      3rd  quadrant.   Both segments are contiguous virtually,
		      allowing the application to treat the virtual  range  as
		      if it were a contiguous 2 gigabyte segment.

		      This  option  only  benefits  executables.  They are the
		      only type of executable  format  able  to	 place	shared
		      objects in the 2nd quadrant.

       Create a window with ID
		      WinId  and attach the specified process to it.  If WinId
		      already exists the call fails.

       The default behavior for
		      is to exit without executing the user specified  program
		      if  the memory window cannot be set.  The failure to set
		      the memory window may be caused by:

			·  The lack of enough memory windows in the system.

			·  The memory windows feature is not implemented.

			·  The request requires a new memory  window  be  ini‐
			   tialized  and  the  system was not able to allocate
			   the memory to do so.

			·  A memory window with WinId could not	 be  found  in
			   the attempt to join a memory window.

			·  A  memory  window  with  the WinId was found in the
			   attempt to create a memory window.

		      The option instructs  to	execute	 program  whether  the
		      desired  memory window was set or not.  Obviously, using
		      this option there	 is  no	 guarantee  program  has  been
		      attached	to the desired memory window and it is unclear
		      in what memory window it is running.  Using this	option
		      is strongly discouraged.

       Specifies the desired memory window.
		      WinId is a key to the desired memory window.  WinId is a
		      user specified value and should be  one  of  the	values
		      contained in the file

		      Applications  extract  the  user key from according to a
		      unique string contained in using the command.  (See get‐
		      memwindow(1M) and services.window(4).)

		      The  kernel  tries  to  locate  an  existing window with
		      WinId.  If one is found, that window  is	used.	If  no
		      window  with  WinId is found, an unused entry is located
		      and assigned to WinId.

		      The value for  WinID  is	special.   If  specified,  the
		      process/program is placed into the default global window
		      instead of a unique window with ID WinId.

		      If WinID is unspecified, the process  and	 its  children
		      will  run	 in a private memory window, and no other pro‐
		      cesses in the system can attach to this  memory  window.
		      This  memory window remains active until the process and
		      its children terminate.

       Join an existing window with ID
		      WinId.  The specified process attaches  to  an  existing
		      memory window.  If no entry exists the call fails.

       If	      program is executed, the default behavior is to (see the
		      wait(2) manual  page)  for  the  process	to  terminate.
		      Specifying  causes to exit after forking the child (that
		      will execute program).

       Send the PID of the executed
		      program to standard output.  The message	sent  out  is:
		      where dddd is the decimal value of the PID.

       Change the memory window for process
		      pid,  or	start  program in the specified memory window.
		      If program has arguments (arg ...), they	must  also  be
		      specified.

		      If  is  unspecified  or  the value of pid is the calling
		      process has its window ID changed, and program  is  exe‐
		      cuted.

		      If  a  nonzero process pid is specified, only the window
		      in that process is changed, and program is ignored.

       Execute in verbose (debug) mode.

   Application Usage
       Memory Windows helps alleviate the 1.75-gigabyte limitation on  system-
       wide  shared  memory  for  32-bit  applications by allowing cooperating
       applications  to	 configure  their  own	1-gigabyte  window  of	shared
       resources.

       The  definition	of  a  memory window is only available for 32-bit pro‐
       cesses.

       Note that memory windows allows the creation of more  than  1.75	 giga‐
       bytes  of  total	 system-wide shared memory, but it does not extend how
       much shared memory a single process can create.	executables are	 still
       limited to 1.75 gigabytes.

       HP-UX  ships  memory  windows  disabled.	 To enable memory windows, the
       kernel tunable parameter, must be set to the  desired  number.	repre‐
       sents  the  number  of memory windows beyond the global default window.
       Setting to for example, would produce a total of three memory  windows,
       the  default  global  window plus two user defined windows.  Setting to
       leaves only the default or global memory window.

       There are two new commands and one file introduced by  memory  windows:
       and file.

       The  file  maps	a memory window application to a particular window ID.
       Using this central file allows applications to share memory windows, by
       using  the same window ID, as well as avoid unintentional memory window
       collisions.  See services.window(4) for more information.

       The command is used to extract the window ID of a user process from the
       file.   The  command starts a particular process in a memory window.  A
       common usage of these commands is to extract a memory  window  ID  with
       which is then passed to to start a process with the given window ID.

       Processes  must be in the same window to share data.  Processes wanting
       to share global data, such as shared memory  or	memory	mapped	files,
       must  make  sure	 all processes are in the same memory window.  If pro‐
       cesses in different memory windows wish to  share  data	reliably,  the
       creator	of the data must take steps to guarantee the data is placed in
       a location accessible to all processes.

       For more detailed information on memory windows, refer to the

RETURN VALUE
       The exit value is 0 on success or a positive number on failure.

       If is not specified, the value is the exit status of the executed  pro‐
       gram, obtained from the system call.

EXAMPLES
       Start the program in a memory window extracted by the string

       Start  the  program  in	a newly created memory window extracted by the
       string

       Start the program in an existing memory window extracted by the string

       Start the program in a private memory window.  Only and its descendents
       can access the window.

WARNINGS
       Programs using a memory window can access shared memory objects created
       by other programs using the same window (depending  upon	 permissions).
       However,	 by default, programs using a memory window may not be able to
       access shared memory objects created by programs using other windows or
       those not using windows at all.

       To  enable  access to a shared memory object across programs using dif‐
       ferent windows, or between those using windows and those not using win‐
       dows,  the  program  must  specify  special  options  when creating the
       object.	See shmget(2) and mmap(2) for details.

AUTHOR
       was developed by HP.

FILES
       File containing applications' associated window IDs.

SEE ALSO
       getmemwindow(1M), services.window(4).

							      setmemwindow(1M)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net