Re: sleep from terminal



In article <haberg-0301061058340001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
haberg@xxxxxxxxxx (Hans Aberg) wrote:

> In article <znu-F6B1F2.20180502012006@xxxxxxxxxxxxxx>, ZnU
> <znu@xxxxxxxxxxxx> wrote:
>
> > > Then stuff, like sleep and probably some drivers, that does not fit
> > > into that model is added by code external to that. This is what is
> > > causing kernel panics, external faulty code that the UNIX
> > > kernel cannot handle. So if one should get the UNIX kernel to handle
> > > things like sleep, it must call an external Mac OS X program that can
> > > do the job. AppleScript evidently can do it (by the other posts).
> >
> > Power management, including sleeping, is definitely something handled
> > within the kernel. Whether it's actually in the base kernel code or in a
> > kernel extension isn't really relevant; it all ends up in kernel space
> > at run-time.
>
> Sure it is relevant, whether it is in the UNIX kernel, or if it is in
> non-UNIX kernel extensions, as it affects reliability, for example.
>
> The situations seems to be like that of Tenon BSD UNIX running as a
> program within Mac OS 9. In that case, the reliability and capacities of
> the UNIX programs are limited by Mac OS 9 reliability.
>
> For Mac OS X, it seems that one has added a mini-OS, by which the FreeBSD
> and its Mach kernel run within.

There is no separate 'UNIX kernel' component in OS X. There's just a
kernel, called 'xnu', which contains Mach code, code borrowed from
various BSD systems, and a bunch of code written by Apple and NeXT over
the last couple of decades. Then, there are a bunch of kernel modules
which extend the kernel, to add support for specific hardware, file
systems, etc. Everything else, including everything that makes OS X
Mac-like, runs *on top* of this kernel.

> > But just because something is in the kernel, doesn't mean there's a *nix
> > command to access it. And just because something is outside of the
> > kernel, doesn't mean a *nix command can't access it.
>
> The original the answer I gave, was for a UNIX shell command; I should
> have added that one must call something without that UNIX environment to
> get the effect. The answer given, using AppleScript, also gives hint that
> some of these things cannot be handled within the UNIX proper itself.

There *is* nothing in OS X which occurs outside of the *nix environment.

> Sure, Apple has added commands by which it seems almost anything can be
> run from a suitable Apple shell command, and in later Mac OS X versions,
> more and more it put over to the UNIX part proper.

Once again, there is no separate UNIX environment in OS X. OS X is a
*nix operating system. All the Mac-like stuff runs *within* this
environment.

--
"Those who enter the country illegally violate the law."
-- George W. Bush in Tucson, Ariz., Nov. 28, 2005
.



Relevant Pages

  • Re: benutzer umbenennen
    ... ja ein Unix Kernel. ... Kernel ist der Kern des Betriebssystems, der I/O, Prozess- u. ... Kleinkrautern und Pinguin-Exkrementen darf sich Mac OS 10.5 (oder besser: ... angelegten User werden nämlich im DirectoryService verwaltet, ...
    (de.comp.os.unix.misc)
  • Re: Windroids, wish you had Safari?
    ... It is not itself BSD Unix. ... the surface of Mac OS X lies an industrial-strength UNIX foundation ... You mean a totally different kernel is a surface layer? ...
    (comp.sys.mac.advocacy)
  • Re: Windroids, wish you had Safari?
    ... It is not itself BSD Unix. ... the surface of Mac OS X lies an industrial-strength UNIX foundation ... You mean a totally different kernel is a surface layer? ...
    (comp.sys.mac.advocacy)
  • Re: OFF TOPIC: Unix in a Nutshell Orielly 3rd edition
    ... >> I would love to know of a description of the Unix ... on the 'kernel' side of the OS, ... against Primates, some of my best friends are Primates. ... hence is PID 0, or we will see it in other ways, but ...
    (perl.beginners)
  • Re: To the OP: Wintroll FUD about alleged insecurity refuted (was: Re: Linux why?)
    ... onto which a 32-bit Windows kernel was bolted. ... what he said was that "Windows NT is a better UNIX ... Microsoft Xenix way back when). ... The "total rewrite" of Vista was not a total rewrite at all. ...
    (comp.os.linux.misc)