Commit Graph

12 Commits

Author SHA1 Message Date
David Anderson 17a4ab8db9 David 11 Dec 2012
- Win process control (affects API and wrapper):
		Since Win doesn't have an API for process suspend/resume,
		we were suspending processes by
			1) enumerating all the threads in the system (typically several thousand)
			2) suspending those belonging to the given process
		The problem: for each thread, the code was calling a function
		in diagnostics_win.cpp to see if the thread was exempted from suspension.
		This check (which is unnecessary anyway if we're suspending another process)
		was surrounded by a semaphore acquire/release.
		The result: performance problems.
		It could take a minute to suspend the threads.
		Solution:
			1) do the check for exemption only if we're suspending threads
				in our own process (i.e. from the API)
			2) if we're suspending multiple processes, enumerate the threads
				only once, and see if each one belongs to any of the processes
			3) have the wrapper elevate itself to normal priority.
				Otherwise it can get preempted for long periods,
				sometimes in the middle of scanning the threads.
		Note: post-9x versions of Win have a process group API that includes suspend/resume.
		We'll switch to this soon.
2013-03-04 17:02:40 +01:00
David Anderson 77e3c4d06c - API: compile fixes for MinGW. From Oliver Bock.
svn path=/trunk/boinc/; revision=24474
2011-10-24 23:38:19 +00:00
David Anderson 8ad9d7d98b - more code shuffling:
proc_control: controlling processes
    procinfo: enumerating and querying processes
    run_app_windows: launching apps as other users on Win


svn path=/trunk/boinc/; revision=24120
2011-09-02 18:23:13 +00:00
David Anderson ecf614812e - code shuffling
svn path=/trunk/boinc/; revision=24119
2011-09-02 18:04:10 +00:00
David Anderson f9d5fbaf77 - client: win compile fix
svn path=/trunk/boinc/; revision=23086
2011-02-23 00:02:06 +00:00
David Anderson a0fd3445fc - wrapper: improve and bullet-proof the way we kill apps.
Win: enumerate all descendants, and kill them all TerminateProcess().
    Unix:
        send the main process a SIGTERM.
        Check once a sec for existence of descendants.
        if none, done
        If any still exist after 10 sec, kill all descendants
- wrapper fix bug in Win env var stuff
- scheduler: check for VBox version 3.2+ in app_plan()
    

svn path=/trunk/boinc/; revision=23085
2011-02-22 23:11:34 +00:00
David Anderson 4f66bb4c95 - added copyright and license info to .C, .cpp, .h files
- scheduler: fix bug in adaptive replication:
    if send an unreplicated job to untrusted host,
    set both wu.target_nresults and wu.min_quorum to app.target_nresults.

svn path=/trunk/boinc/; revision=15762
2008-08-06 18:36:30 +00:00
Rom Walton ec1082130a - API: Include 'Global\' in the shared memory segment name for worker and
graphics applications so that the memory can be shared across terminal
        server sessions.
    - API: Add some trace messages to window creation and shutdown events, it
        is all logged to stderr.
    - API: Add some trace messages for loading graphic files.
    - API: Add some trace messages for loading font files.
    - API: There can be only one hInstance and it is assigned to the app at
        startup via winmain(). Use it throughout the graphics2 impl.
    - CC: Use the service security token to startup worker applications.
    - MGR: Use the interactive security token to startup graphics
        applications.
    - LIB: Create two different logon methods, one for logging on interactively
        (graphics applications) and one for services (worker application).

    api/
        graphics2_util.C
        graphics2_win.C
        gutil.C
        txf_util.C
    client/
        app_start.C
    lib/
        proc_control.C, .h
    win_build/
        boincmgr_curl.vcproj

svn path=/trunk/boinc/; revision=14905
2008-03-13 21:18:04 +00:00
David Anderson e227059121 - Makefile for MinGW
svn path=/trunk/boinc/; revision=14883
2008-03-10 23:12:39 +00:00
David Anderson 671cf8f764 - compile fixes for Win
svn path=/trunk/boinc/; revision=14881
2008-03-10 22:52:43 +00:00
David Anderson 671524df2a - Second pass at the above. We still need run_program() in util.C.
The problem was that there's a lot of extra stuff needed
    for running apps on Windows (e.g. related to sandboxing).
    This needed to be a new function.

svn path=/trunk/boinc/; revision=14879
2008-03-10 22:36:22 +00:00
David Anderson cc2f1a20a0 - lib: moved "run program as user" stuff to a separate file,
so it doesn't screw up the linkage of apps that don't use it
- start of server-side support for coprocessors

svn path=/trunk/boinc/; revision=14878
2008-03-10 21:59:27 +00:00