home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aix / 9180 < prev    next >
Encoding:
Text File  |  1992-08-29  |  2.3 KB  |  72 lines

  1. Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!chx400!aragorn.unibe.ch!iacrs1!haedener
  2. From: haedener@iacrs1.unibe.ch (Konrad Haedener)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: Running batchjobs without disturbing interactive usage, ok now?
  5. Message-ID: <1992Aug28.143928.4432@aragorn.unibe.ch>
  6. Date: 28 Aug 92 14:39:28 GMT
  7. References: <BIS.92Aug28152036@maud.ifi.uio.no>
  8. Sender: haedener@iacrs1 (Konrad Haedener)
  9. Reply-To: haedener@iacrs1.unibe.ch
  10. Followup-To: <BIS.92Aug28152036@maud.ifi.uio.no>
  11. Organization: University of Berne
  12. Lines: 58
  13.  
  14. In article <BIS.92Aug28152036@maud.ifi.uio.no>, bis@ifi.uio.no (Bjorn Ivar Stark) writes:
  15. |> We tried to run heavy batchjobs with max nicefactor (eq. 20) and
  16. |> limited the RSS by setting the default RSS variable in
  17. |> /etc/security/limits file, so that the interactive grafical user 
  18. |> could do his work more or less unotified of the batch runs (we
  19. |> hoped).
  20. |> 
  21. |> However in 3.1.5 this didn't work satisfactory, and we had to
  22. |> dedicate this machine for grafical use (RS/6000 mod 550) and I
  23. |> heard that neither the low priority nor the RSS limit was
  24. |> implemented properly.
  25. |> 
  26. |> However is there any reasen that it work o.k. now in 3.2?
  27. |> 
  28. |> Anybody.
  29. |>  
  30. |> --
  31. |> ------Vennlig hilsen-----
  32. |> Oystein Fosli, B240
  33. |> Norsk Hydro a.s           Ph.: (472) 739660       
  34. |> Postboks 200          Fax: (472) 739555
  35. |> 1321 STABEKK         internet: bis@ifi.uio.no
  36. |> Norway
  37.  
  38. Two suggestions:
  39.  
  40. o  quick-and-dirty:
  41.  
  42.        #include <stdio.h>
  43.        #include <sys/sched.h>
  44.  
  45.        main()  
  46.        {
  47.        pid_t procid;
  48.        int   prio;
  49.  
  50.        printf("Enter PID:      ");
  51.        scanf("%d", &procid);
  52.        printf("\nEnter Priority: ");
  53.        scanf("%d", &prio);
  54.  
  55.        setpri(procid,prio);
  56.        }
  57.  
  58.    Enter the process id of your batch job and 126 as the priority
  59.    (you need root privs). But beware: this is only an illustration of
  60.    setpri(); terrible things will happen to your running system when
  61.    you enter low values for the new priority.
  62.  
  63. o  solid-and-mature:
  64.  
  65.    use NQS (the Network Queueing System).
  66.  
  67. -- 
  68. Konrad Haedener                             Phone: +41 31 65 42 25
  69. Institute for Physical Chemistry            FAX:   +41 31 65 44 99
  70. University of Berne
  71. Switzerland                                 haedener@iacrs1.unibe.ch
  72.