- OS Definition :
OS =
Kernel + OS Services (a.k.a OS programs, OS utilities, System Programs)
Kernel :
* Core of the OS
* Static image loaded at the start of booting
* Most important part of the OS
* Responsible for the abstraction of Hardware
=> Provides Hardware lowest-level abstraction layer
=> Programs that need to use hardware components need only
to communicate with the Kernel using System Calls
rather than communicate with Hardware Components
directly and having to dwelve into the technical
details of each component
* Responsible for mediating the communication between programs
and hardware components
* Responsible for managing resources + the execution of programs
* 2 types :
Monolithic Kernel
MicroKernel
OS Services :
* Services considered part of the OS
i.e. windowing system, command shell...,
programming interface to the kernel
(compiler tool and library)
* 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
=> 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
- OS Objectives :
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
3) Ability
to easily evolve :
-
Should be constructed in
a way to permit the effective development, testing, and
introduction of new system functions without interfering with
service
- Easily Upgradable/Updatable, Adaptable to technologies evolution
N.B :
* User = Developer
- Developer can :
* Use Machine Instructions => Developer completely
responsible for directly controlling the computer
hardware
* Use System Programs provided by OS => Developer uses
Utilities provided by OS for program creation,
then makes calls to OS Libraries Functions in its
Application Program. While running, the Application
Program will invoke these System Programs which will
perform appropriate actions depending on OS
implementation
*
API per Library
Most important Library in UNIX = C Library
=> API for C Library = POSIX-API (UNIX), Linux-Kernel-API (Linux)
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
I/ UNIX Architecture :
** Bourne Shell (sh) and Korn Shell (ksh) are associated with AT&T UNIX
** C Shell (csh) associated with Berkley UNIX
** Bash Shell (bash) associated with Linux