Operating Systems Notes
Operating Systems Notes
- OS/Kernel Definition :
OS = Kernel + OS Libraries + OS utilities (aka OS Programs, System Programs)
i.e. Shell, Compiler, Word Processor…
- Offers Abstractions :
(Hardware = Processor Type, MMU architecture, I/O Bus, PCI)
(For a kernel compiled for a particular architecture
i.e. x86-32, x86-64.)
(UNIX != Windows NT definition)
Provides :
v) * Protection + Security
May provide :
Monolithic Kernel :
MicroKernel :
- Kernel Code implements the minimum needed : Core
functions which are the only running in Kernel Space
=> Kernel-Mode Code is small
Layered Kernel
OS Services :
* Services considered part of the OS
i.e. windowing system, command shell...,
programming interface to the kernel
(compiler tool and library)
Device / Special Files : interface for a Device Driver which makes the Physical
Device appear in a File System as if it were an ordinary
Regular File = Sequence of bytes
Devices Classifications :
* Character Device :
= Raw Device
Device to which Data can be written and from which Data can be
read directly, without the use of any intermediate buffers
in the Kernel between the User Space Program and the Raw
Device
=> No preprocessing by the Kernel for the read/write request by
the User Space Program
(No Flow Control or Buffering/Caching)
=> Kernel (via the VFS) passes directly the request from Program
to Raw Device Driver which takes responsibility of passing
it to the Raw Device
=> Device may require that all reads and writes are aligned to
block boundaries (fixed block size)
tty
Default in FreeBSD
* Block Device :
Device to which Data can be written and from which data can be read
through Kernel’s caching/buffering
=> Kernel preprocessing ON : Flow Control + Caching
by the Kernel I/O Scheduler
=> Order of data lost since there is a delay between data passed
from Process to Kernel’s Buffers, and data passed from
Kernel’s Buffers to the Device
Caching will reorder the sequence of write operations, depriving
the application of the ability to know the exact disk
contents at any one instant in time
1) Convenience :
- Make a computer more convenient/easy to use by users
=> Act as User/Computer Interface = Function 1
2) Efficiency :
- Allow computer system resources to be used in an efficient way
=> Act as Computer Resource Manager = Function 2
i) OS as a User/Computer Interface :
* User = Developer
OS = Kernel + Utilities
Linux is just a Kernel. It needs GNU utilities to be operational
Unix is an OS
Windows is an OS
https://en.wikipedia.org/wiki/Linux_kernel_interfaces
https://www.kernel.org/doc/htmldocs/kernel-api/ : LINUX-Kernel-API
http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ : POSIX-API