delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/12/16/12:38:02

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D1563858D39
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1702748281;
bh=ldyiz4/Smm53nTg6+AksNl6SsM1RTjlPpCsls3TuE/8=;
h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=obMn1aGlsiVJ5B3bBvjYCzPlpZrxyi4NZPMaSewJ1VoIbGOwc2Kx+sdwTGQY3qe6q
P2WRpJgCcE1eldUKZ/EL+FUB65XzaxEVldnl88sMjp5Xx1zhMpqHDdbSmMtK4PLoys
sv6u3XG5+pyCNDiA9xufmrxaEtmn7g/HP0gqIz3E=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19A0A3858D33
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 19A0A3858D33
ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1702748243; cv=pass;
b=eD8Q4k2z1zcD8oGu7DJDVBi5j4keid2CubITpallJaaJ0oovjpCgy5RmJf87B4eTSQ1CqWyO/ErsHmdFALmSAOwmMgh1qgcHEJ2HQA5icVYBkUYAwuBI+Z6cGxpbbSL948bgfRwNNvVJPEzZeVxMo/qy9Z7LHr841Ze87n3JKW8=
ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key;
t=1702748243; c=relaxed/simple;
bh=8HUAOED+KxzmhmhqBxtdVKR319eHauUkniAZON3fb5w=;
h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:
MIME-Version;
b=NXDyDQdxtmLxMJSlwbETWTZa4+Tkc/6q1oTr8e6OKyUFc0c3Del4dfBXpv6ASK4oGd9xwtba+jQB1bIorJ1y6qKEOTcWU/nrTzptlQTH+cn1vRsdZWKakyg7EpS+yBIXcH3G5zyrn3yyjaziHOQKzhRoiKmn787dpuoWyPh0cDE=
ARC-Authentication-Results: i=2; server2.sourceware.org
X-CSE-ConnectionGUID: AVrWrRryTkCoQtZAeSwHCg==
X-CSE-MsgGUID: fpRr2vqESLiWhFXpgq35Tw==
X-SBRS-Extended: Low
X-IronPortListener: ces-out
X-IronPort-AV: E=Sophos;i="6.04,281,1695700800"; d="scan'208";a="449459589"
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=D9i4yinOLbq3yi7NggGo2S36fRAH0mGtp+LbdaZED0t8r+tFUiExbsyKdnZlJXoHuJ5+kSt/vpMAKRNwEJR1kycXFZI0xGMxZVWYSyxNDNjhTuKi3oLb5u/P7Yw6bD5dK6UGGt5UCmNMDkOgYHKv6966hsymmlWpCpyi5rjd3uHG1DpYmywfWkGWMbMMSfCg3Ns1S7v5tPhjZx3/Xu0feo0e9ef/cOg/pNVMLPlLwZmUVdu+J4ejCuWUEx2g4OP6CtLSVHE/VZT4wZkVfLSwclLdBAMwTNeV2PBu5MmW6XYmwNOkonOrB+aNQ/BkNyC9oQNxJYhnVBOjmGocHIiLnw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=sKfJa24Z8i+DZmrth0tMv5aZml9kWifXY6zY02jVQF0=;
b=YrmgkhSAmXjUvk6UbjO0Kvy0+eR0LLR8rW4juoNdGpO2lzuN2KJ/ECezWVPMpI5CcLou4bsNrO/4mvUS54zeTUZaoKBsthHFr9fTzudjSnZKJXIycrb9szkT5e5nDCWc1a6nOzDepC3dZ/6DQEL2E7MIcsJ0bkHpStnejFGoJ2LP6xl8hPHiL8gf0kv33CZpyORdQmkQbzmP+TF9OBzeBl7hJteuut/esBlso4YFZZcsZHfdBTlrf3ksz/tIcNIfQajB3mgPlZ4r0ZHNsKTpdyxzEGJkK4m/pZGrTnJiRSvSX33daqDuhFL+mS7GdlP66NhbLRu7+VElsvMCUl052A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=ncbi.nlm.nih.gov; dmarc=pass action=none
header.from=ncbi.nlm.nih.gov; dkim=pass header.d=ncbi.nlm.nih.gov; arc=none
To: Backwoods BC <completely DOT and DOT totally DOT trash AT gmail DOT com>,
"cygwin AT cygwin DOT com"
<cygwin AT cygwin DOT com>
Subject: RE: [EXTERNAL] Re: How efficient is 'sleep'?
Thread-Topic: [EXTERNAL] Re: How efficient is 'sleep'?
Thread-Index: AQHaL7DydBWqhjuJvkyWrdyA4S3F+bCsKYxg
Date: Sat, 16 Dec 2023 17:36:51 +0000
Deferred-Delivery: Sat, 16 Dec 2023 17:35:58 +0000
Message-ID: <DM8PR09MB7095B74595D43324BE82BFBCA592A@DM8PR09MB7095.namprd09.prod.outlook.com>
References: <CAKwdsS-eM0APxDhbFNq6SBVKK51hteMgKrwmzm-ZNNEUnaON=A AT mail DOT gmail DOT com>
<910db078-35f2-00f8-0654-59c3c58535e3 AT cs DOT umass DOT edu>
In-Reply-To: <910db078-35f2-00f8-0654-59c3c58535e3@cs.umass.edu>
Accept-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DM8PR09MB7095:EE_|SA1PR09MB10054:EE_
x-ms-office365-filtering-correlation-id: 43d241a0-418e-40d8-d7f8-08dbfe5da6b5
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: pzkhixTbPW5jdaR+wj6Cvenl2nh127MhPu8Wa/M7IbPSeb0flKUUPulX0W/J0icqJVnlTxrWghZZwDkLwByvGFDES0ZFrD89tumEGRUttFCrqV0fW/bcNnGc1P/pD6BRftluTBM5b3MmZlZSCbVfzZ0lTGhm1p7hBf7fQ5XqGNGTEJEoggf9+FlQx1bDzWAhNvP2piISHsdXAtf05qH5emPDXAqmPcn8xiM9dum6ghzEZkiZY6rBSIsh9pkuhAjWBTomQ4q8Y3c2bn46G86xDMZnR/edFDJrXyqW5f1sTpyhmn67/PfXaHA03tnpYIx3mlg5bAfNvDYmybOMJqtwL/+7GWHfx7cik5J2y9+sg26O+JMYF4eWT7iMTf3djL4kj9QJOlvmUKfhiRndAxxcxe6zNkCfwvUhZ5ew4fNqGWNYWRtsejBvzUj/Ls/UokiabhAy85igI99qe43Rp/RjJkSE/y7EXUyRSnfZ4lpz5uhg2okCDi94fbMlow1v7wmML9cz9vaLBqeRZdvSaXBe+9SRzpt8M3Kg/tedLDwybQ17+x7OQt+at+YsMh+zvUO9iSTJwzy8a6hf2VoLqVVOAC2ZfBl8ey3J/UwLLvr+S2pcD+H3V0B/z67hxh5e/JRh
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:DM8PR09MB7095.namprd09.prod.outlook.com; PTR:; CAT:NONE;
SFS:(13230031)(366004)(230922051799003)(1800799012)(451199024)(186009)(83380400001)(71200400001)(26005)(122000001)(38100700002)(8676002)(5660300002)(8936002)(52536014)(4744005)(2906002)(498600001)(66946007)(6506007)(6666004)(7696005)(9686003)(64756008)(66446008)(66476007)(66556008)(76116006)(110136005)(33656002)(86362001)(38070700009)(55016003);
DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?O9BlNNtDOoawlEUsKkRdNCDRbmtSTPoaQ+HYnTpe+eRX81tmxeLVLfdSVnrB?=
=?us-ascii?Q?eyidkjFdPycJTMh3JqRIzhnbk7gs3fFRc2i3h5yANCqjbJkeiPSyvMR5cpIu?=
=?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AB9LX62xGOss282PGQajR8JkE4/tMCf+5sXdLk1SnccutQ98+h3Ily7rEJJutzI/oQbJkxxDQi/tsc4RZF5bpOwmOLYe6+3KhYtcN23+NRWR5234c814OX8N2tXsjIpN5UOPyt8EZ49c5pTV7rTonb75gzlyztlK5/OaCWiiTCVIt0SN7jPNtb8hLrgIzhb8DkV7geZiSTJZuLVJhbTyYFh0y2Bm55qA09Fo0dIew7nbv8Q4e4kvrtuATsWmKn8Gc7zuxVgJ3dA+RtAvngRxcaSp1qluczjwiFK0axQuWshTuX78IUIMDNTuF6NnqskSIgjUGSiMknB6rgXy+nM0CrNYvnbiBKzyzfqu9h3JvmmwZUDwhQ+t+5XHk5Af54rTdbM/e206LaIhzA9EPP7JjBqyl0H5I2nRg3WnV9V9fhN5FsHO30uozNO4KhdFfxh/0s1yUi/8NQeJ002QEWVZurQ2dm68YsxaJ/+0P4rwj0DGOK
X-OriginatorOrg: ncbi.nlm.nih.gov
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM8PR09MB7095.namprd09.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 43d241a0-418e-40d8-d7f8-08dbfe5da6b5
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2023 17:37:18.4824 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 14b77578-9773-42d5-8507-251ca2dc2b06
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR09MB10054
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE,
T_SPF_HELO_PERMERROR autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: "Lavrentiev, Anton \(NIH/NLM/NCBI\) \[C\] via Cygwin" <cygwin AT cygwin DOT com>
Reply-To: "Lavrentiev, Anton \(NIH/NLM/NCBI\) \[C\]" <lavr AT ncbi DOT nlm DOT nih DOT gov>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

> the process isn't allocated any CPU time until the timer expires.

Almost so.  But the "sleep" functions are interruptible, so if a process (the "sleep" command)
is somehow signaled, it will wake up prematurely, and will have to either put itself back to
sleep (for the remaining unslept time) or terminate, whatever the implementation is.  So in the
former case, there is some CPU still consumed (and that would depend on how often the signal
arrives), and in the former case, the actual slept time can be quite inaccurate (from what you
think it should have been).

Signaling with scripts can be quite tricky as the signal can propagate to the entire process
group, rather than a single process (depending on which process the signal was sent to).

Using cron (as others suggested) gives you a time accuracy up to a second (give or take), but
then again it depends on the load of the system, and may drift rather significantly.

My $.02,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019