Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
59 views

Modul 11. Operating Systems

The document provides an overview of operating systems, including: - An operating system controls all other programs in a computer and manages memory, processors, devices, and file systems. It provides an abstraction layer between hardware and software. - Operating system components include the kernel, drivers, utilities, and applications which communicate via system calls and APIs. - Popular operating systems discussed include z/OS, IBM i, OpenVMS, and various desktop and server operating systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Modul 11. Operating Systems

The document provides an overview of operating systems, including: - An operating system controls all other programs in a computer and manages memory, processors, devices, and file systems. It provides an abstraction layer between hardware and software. - Operating system components include the kernel, drivers, utilities, and applications which communicate via system calls and APIs. - Popular operating systems discussed include z/OS, IBM i, OpenVMS, and various desktop and server operating systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

Operating Systems

Introduction
• An operating system is
the set of programs
that, after being
initially loaded into a
computer by a boot
program, controls all
the other programs in
a computer
Introduction
• Operating systems manage a computer’s internal
workings
• Memory
• Processors
• Internal and peripheral devices
• File system
• Operating systems are used on for instance::
• PCs and laptops
• Virtual machines
• Servers
• Tablets and mobile phones
• Network routers
• Storage arrays
• Cars
• Televisions
Introduction
• Operating systems provide an abstraction layer
between (virtualized or physical) hardware and
software applications
• As a service to applications, low level hardware
management is handled by the operating system
• Process management
• Memory management
• Interrupt handling
• Multi user management
• File locking and file sharing
Introduction
• Operating systems provide services to
applications in the form of Application
Programming Interfaces (APIs)
• For example for:
• File management
• I/O interfaces (like video and keyboard)
• Hardware drivers (like printer drivers)
History
• Early operating systems could execute one program
at a time
• At any given time, one user had sole use of the
computer
• Through the 1950s, many major features were
pioneered in the field of operating systems, including
multitasking
• During the 1960s, IBM introduced a single operating
system (OS/360) for all of its mainframes
• In 1969, UNIX was created
• UNIX used a file system with directories
• Standard POSIX system calls
History
• An early operating systems for personal computers
was CP/M
• CP/M introduced drive letters (c:), but no directories
• Parts of CP/M and UNIX were imitated in MS-DOS
• Drive letters and directory structures
• System calls
• MS-DOS became extremely popular when chosen as the
default operating system for the IBM PC
• The most popular operating systems running on
servers today are Microsoft Windows, Linux, and
UNIX
Operating system building blocks
Operating System building
blocks
• An operating system basically performs two
basic operations:
• It enables multiple users, multiple processes, and
multiple applications to run together on a single piece
of hardware
• It hides the technical complexities of the underlying
hardware from the applications running on top of the
operating system
Operating System building
blocks
• The kernel is the heart of an
operating system
• Starts and stops programs
• Manages the file system
• Performs low level tasks that
most programs need
• The kernel schedules access to
hardware to avoid conflicts if two
programs try to access the same
resource or device simultaneously
Operating System building
blocks
• Drivers are small applications that
connect specific hardware devices
to the kernel
• Printers
• Network cards
• Keyboard and mouse
• Video screens
• Utilities are applications that are
considered part of the operating
system
• User interfaces
• Logging tools
• Editors
• System update processes
Operating System building
blocks
• Applications consist of one or
more processes that
communicate with the
operating system using system
calls that are invoked through
Application Programming
Interfaces (APIs)
File systems
• The operating system provides a file system to
applications
• File systems usually consist of directories (also known
as folders) with files or other directories
• The operating system hides complexity
• Handling individual disk blocks or communication with
a SAN or NAS
• Managing the files and the directory structure
• Security – permission to read, write, create, and delete
files and directories
File systems
• Most operating systems can handle multiple
types of file systems on multiple disks at the
same time
• Some popular file systems are:
• FAT (File Allocation Table), vFAT, and FAT32, used in
MS-DOS, older versions of Windows, and removable
storage devices like USB memory sticks
• NTFS (New Technology File System) used in Windows
• UFS (Universal File System) and VxFS (Veritas File
System) used in most UNIX flavors
• Ext (and Ext2, Ext3, Ext4) - used in Linux
File systems
• Journaling file systems keep track of changes made to
files in a journal log before committing them to the
main file system
• Higher availability
• Fast recovery in case of a malfunction
• File systems must be mounted before they can be used
by the operating system
• A disk and the file system on it must be recognized by the
operating system and attached to it
• After mounting, the file system is typically given
either:
• A drive letter (Windows)
• A drive name (OpenVMS)
• A mount point in the global directory tree (UNIX and Linux)
File systems
• Most operating systems provide file sharing
functionality
• File sharing enables files on one system to be accessed
by (users on) other systems
• File sharing protocols:
• NFS: originates from UNIX
• SMB/CIFS: originates from Windows
APIs and system calls
• System calls are programming functions
• Provide a hardware-independent interface to tasks the
operating system can perform for applications
• Example:

int read(int handle, void *buffer,


int nbyte);

translates into the system call

READ(FILEHANDLE, DESTINATION DATA


POINTER, NUMBER_OF_BYTES)
APIs and system calls
• The operating system takes care of:
• Looking-up the file in a file allocation table
• Looking up the disk blocks on disk
• Instructing the disk controller to fetch the needed disk
blocks
• Copy the disk blocks to memory
• Providing a pointer to the disk blocks in memory
APIs and system calls
• System calls are grouped and presented to
application processes as Application
Programming Interfaces (APIs)
• APIs describe the available system calls in an
operating system and how they can be used by
programmers in their applications
• Each operating system has its own API
• UNIX and Linux use the POSIX standard
• Windows has its own API
Device drivers
• The operating system
manages all hardware
• I/O devices are controlled
using device drivers
• Pieces of software that
interact with the device's
hardware (like an Ethernet
network adapter or a SAS disk
adapter)
• They provide an Application
Programming Interface (API)
to the operating system
Memory management
• The operating system:
• Allocates and de-allocates memory on behalf of applications
• Manages what happens when the amount of requested
memory exceeds the physical amount of memory
• Memory management includes:
• Cache management
• Paging
• High volume data transfers
• Memory management units (MMUs)
• Thin memory provisioning (memory overcommitting)
• Direct Memory Access (DMA)
• The operating system takes care of all of this and just
provides chunks of memory to applications
Shells, CLIs and GUIs
• A shell provides a user interface to the operating
system
• The primary purpose of shells is to launch other
programs, started by end users or scripts
• Two types of shells:
• Command-Line Interfaces (CLIs)
• The user types commands on a keyboard on a command-
prompt
• Examples: UNIX shells (bash, sh, csh) and Windows’ cmd.exe
(also known as a DOS box)
• Graphical User Interfaces (GUIs)
• The user uses a mouse to click on icons or buttons
• Examples Microsoft Windows and X Windows (UNIX and Linux)
Operating system configuration
• The configuration of an operating system is stored
in an operating system specific database or in text
files
• Examples:
• Windows registry
• Files in the Linux /etc directory
• AIX Object Data Manager (ODM) database
• For most used configuration parameters, user-
friendly tools are provided
• These tools still edit the text files, but that is hidden
from the user
Popular operating systems
IBM z/OS
• The most used mainframe operating system
• Extreme backward compatibility is one of z/OS's
main design philosophies
• Programs written for MVS in 1974 can still run on
today's z/OS without modification
• Typical use of z/OS:
• Batch processing: reading and writing large amounts of
data and performing relatively simple calculations on it
• Interactive users: supports thousands of interactive
users
IBM i (OS/400)
• IBM i is an operating system only used on IBM's
Power Systems midrange systems
• The operating system was previously known as OS/400
• The midrange system was previously known as AS/400
• One of the biggest advantages of IBM i is its
completeness, it includes:
• Communications
• Transaction processing
• Relational database manager
• Features for the implementation and maintenance of
data security
• The latest version is "IBM i 7.2“, released in 2014
OpenVMS
• OpenVMS is an operating system developed by DEC
• VMS means Virtual Memory System
• OpenVMS is now maintained by VMS Software, Inc.
• OpenVMS is a multi-user operating system
designed for:
• Time sharing
• Batch processing
• Real-time processing
• Transaction processing
• OpenVMS is not open source software
• The source listings are available for purchase
OpenVMS
• OpenVMS is typically used in environments where
system uptime and data access is critical
• It is used for various applications, including:
• Mail servers
• Network services
• Manufacturing
• Transportation control and monitoring
• Critical applications
• Databases
• OpenVMS for HP Integrity servers based on Intel
Itanium 9500 processors was released in 2015
UNIX - History
• UNIX is a multitasking, multi-user operating system
• Created by Bell Labs (now AT&T) in 1969
• In 1973, UNIX was rewritten in the new C
programming language
• C was created by the same people that created UNIX
• This made UNIX portable to multiple types of computer
hardware
• In 1982, UNIX was licensed to a number of computer
manufacturers
• Most marketed their own UNIX versions based on the original
UNIX source code
• They adapted the code to meet their own hardware and
software requirements
UNIX – vendor versions
• Vendors came up with different names for their UNIX
flavors
• These versions are 90% the same, but have some minor
differences
• Wording of error messages
• The order of commands used to start-up the machine
• The location of certain files

Vendor UNIX flavor


IBM AIX
Oracle/Sun Solaris
HP HP-UX
Mac OS X (built on FreeBSD,
Apple
discussed in the next section)
UNIX – vendor versions
• Each flavor needs specific hardware
• HP-UX only runs on HP Integrity systems
• HP systems cannot run for example IBM’s AIX
• Applications running on a particular flavor of UNIX
cannot run on another flavor without (at least)
recompiling
• Software vendors must provide separate versions of
their applications for each flavor of UNIX
UNIX – vendor versions
• UNIX has been ported to a wider variety of machine
architectures than any other operating system
• UNIX is written almost entirely in the C programming
language
• Source code is published
• Many business software today is released on Linux
before being released on the various flavors of
UNIX
• Linux runs on many hardware platforms without
recompiling
• Linux is now more widely used than UNIX
UNIX - filesystem
• UNIX popularized the hierarchical file system with
nested subdirectories – the directory tree
• All files and directories appear under the so-called
root directory "/“
• Even if they are stored on different physical disks
• UNIX has no concept of drive letters, like Windows
or DOS
• Drives are mounted on a branch in the directory tree,
providing disk space for that particular branch
• Also removable drives must be mounted in the tree
UNIX – system tools
• The UNIX philosophy is to use a large set of small
tools that do only one thing, and do it very well
• To perform complicated tasks, commands can be
combined using a system called pipes
• Pipes feed the output of one command to the input of
another command, without storing the intermediate
result
• For instance, the UNIX command: ls | sort prints a
sorted list of files on the screen
• The pipe sign “|” sends the output of the “ls” command as input
to the “sort” command
• In practice, these chains of piped commands can
get very long and complex
Linux - history
• Linux is a free UNIX-like operating system for the x86
platform
• It is not derived from the UNIX source code
• In 1991, Linus Torvalds wanted to explore the multitasking
possibilities of the new Intel 80386 CPU in his PC
• He decided to create a small multitasking, multi-user
operating system with the help of the internet community
• Because of the open source nature of Linux many
developers contributed
• Kernel patches
• Device drivers
• Multilingual keyboards
• Disk drivers
• Support for video card devices
Linux
• Linux commands and scripts are almost similar to
those of UNIX
• Linux also uses the same commands, file structure,
scripting language, pipes, etc. as UNIX
• Today Linux is a very mature operating system, used in:
• Servers
• Workstations
• Mobile devices
• All Android smartphones
• Appliances like set-top boxes, firewalls and NAS devices
• Ninety-five per cent of the supercomputers listed in the
top 500 list of the fastest computers in the world are
running Linux
• Almost all internet services run on Linux
Linux – GNU/Linux
• The GNU project was launched in 1984 by Richard
Stallman
• Goal was to develop a free UNIX-like operating system
• GNU is a recursive acronym for “GNU's Not UNIX!”
• By 1990, the GNU project had recreated all the major
components of the UNIX-like system except one – the kernel
• Combining Linux with the GNU system resulted in a
complete operating system: the GNU/Linux system
• It is important to understand that Linux is actually only an
operating system kernel
• Wat we call Linux, is actually GNU/Linux
• Linux and the GNU tools are licensed under the GNU
General Public License
• Ensures all source code will be free for all to copy, study, and
to change
Linux – distributions
• Vendors compiled the Linux source code, added
some tools and configurations of their own, and
releasing it in a distributable format
• Some of the best-known Linux distributions:
• Red Hat
• SuSe
• Ubuntu
• Debian
Linux - Support
• Linux can be downloaded from the internet for free
• Most organizations demand professional support
for their software
• Professional support is not free
• Most Linux distribution vendors, like Red Hat and
SuSe, and some independent vendors, offer support
contracts for Linux
Linux on mainframes
• Some Linux distributions can be used on IBM
mainframes, running in virtual machines
• Linux uses X-Windows emulators on PCs to connect
to the mainframe
• The emulated LAN on the mainframe can be used to
connect multiple Linux virtual machines and to
provide an external LAN route
BSD
• Berkeley Software Distribution (BSD) is a UNIX
operating system derivative
• Developed and distributed by the University of California,
Berkeley
• BSD was the basis for three open source
development projects:
• FreeBSD
• Most widely used
• FreeBSD is a complete operating system (Linux is only a
kernel!)
• NetBSD
• Ported to 57 hardware platforms across 15 different processor
architectures
• Often used in embedded systems
BSD
• OpenBSD
• Most secure BSD version
• Has a tradition in which developers audit the source code for
software bugs and security problems
• In the 10+ years of its existence, only three security bugs have
been found in OpenBSD
• Darwin, the system on which Apple's Mac OS X is
built, is a derivative of FreeBSD
Windows - introduction
• Windows is a popular x86 operating system, used on
PCs and servers
• Because of Window’s popularity, a large collection of
software is available
• Microsoft provides a fairly complete stack of business
solutions like SharePoint, BizTalk, SQL Server, and Exchange
• They also provide a development environment (Visual Studio
and the .Net framework)
• Microsoft Azure cloud runs on a slimmed down version of
Windows
• Many organizations have a "Microsoft unless" strategy
• Software is purchased from Microsoft or built using Microsoft
tools, unless there is no solution from Microsoft available
Windows for desktops
• The first version of Microsoft Windows was released in
1985
• Early Windows versions ran as an application on top of
MS-DOS
• Windows was no real operating system
• In 1990, Microsoft Windows 3.0 was the first successful
Windows version
• In late 1995, Microsoft released Windows 95,
positioned as the new operating system for desktops
• Windows 95 introduced the "start" button
• Windows targeted at workstations include:
• Windows XP
• Windows Vista
• Windows 7, 8 and 10
Windows for servers
• In 1992, Windows NT was the first version of Windows
designed to run on servers
• A real operating system, not running on top of MS-DOS
• Windows NT 4
• Included the Windows 95 style GUI
• Companies started the switch from Novell servers to
Windows NT 4
• Some UNIX systems were being replaced by Windows NT 4
systems
• Windows 2000 introduced an implementation of LDAP
directory services, called Active Directory
• The server operating systems were named after the
year of release: Windows server 2003, 2008, 2012, and
2016
Windows – Stability
• While NetWare and UNIX would run for at least a
year without crashing, it was not uncommon that
a Windows server crashed once a day
• Causes:
• The need for backwards compatibility of Windows
• Every version of Windows needed to be able to run all
already developed software without recompilation
• Windows runs on all kinds of hardware
• As opposed to UNIX or Apple systems, which are designed
for specific hardware
• The quality of third-party drivers was not always guaranteed
Windows – Security
• Windows security was weak
• Windows was based on MS-DOS – a single user / single
tasking operating system
• Multi-user features and concurrently running multiple
applications was built in later
• Most Windows applications were not designed with
multi user usage in mind
• Applications had to run with the highest possible user
permissions (administrator rights)
• This led to the rise of viruses and worms attacking Windows
Windows – Security
• The Trustworthy Computing Initiative
• In 2002, spent several months’ full-time effort of all
developers to update the Windows code base to make it
more stable
• As a result, today's Windows versions are reasonably
stable and secure
Windows – Support
• Windows is closed source software
• Only Microsoft has access to the source code and knows
how Windows works internally
• Users are dependent on Microsoft for support and
updates
• Users must follow updates and software upgrades
to get support
• Extended support is sometimes possible, but at a price
• This leads to frequent (and usually costly) upgrade
projects
End user operating systems
• Some operating systems are exclusively designed to
be used on end user devices
• Some examples:
• Windows XP, Vista, Windows 7, Windows 8, and
Windows 10 - Microsoft's PC operating system
• Mac OS - Apple's operating system for laptops and
desktops, based on BSD
• Ubuntu - Linux distribution specially designed for
laptops and desktops
• iOS - Apple's operating system for mobile devices
(iPhone, iPad, etc.), based on BSD
• Android - Google's operating system for mobile devices,
based on Linux
Special purpose operating
systems
• Some operating systems are created for special
purposes, like:
• Firewalls
• Intrusion detection and prevention systems
• Routers
• Phones
• ATM machines
• Media centers
• Typically based on existing operating systems
• Usually based on Linux or Windows
• Stripped of all unneeded features
Special purpose operating
systems
• A special type of operating system is a real-time
operating system (RTOS)
• Guarantee to perform tasks in a predefined amount of
time
• Used where handling events within a predefined time
is critical
• Factories
• Power plants
• Vehicles
• Example: QNX
Operating system performance
Operating system performance
• The performance of an operating system is
dependent on:
• The performance of the underlying hardware
• The type of load generated by the applications
• The configuration of the operating system itself
• Some operating system performance can be gained
by:
• Increasing memory
• Decreasing the kernel size
Increasing memory
• An operating system should have enough memory
to run all applications needed at any time
• When an application needs more than the available
memory, memory is freed:
• Moving less used memory pages to disk
• Paging
• Some paging is not bad
Increasing memory
• When memory is really low, moving an entire
application’s allocated memory to disk
• Swapping
• Ruins the performance of an operating system
• Data stored on disk is at least three orders of magnitude slower
than data stored in RAM memory
• Swapping must be avoided at all times
• Increase memory
• Run less (demanding) applications
Increasing memory
• Increasing memory benefits the operating systems’
performance
• All memory not used by applications is used to cache
disk blocks
• This is the main reason why the performance of operating
systems usually increases when memory is added
• Operating systems use highly sophisticated
algorithms to optimize disk caching
• In general, tweaking the memory management
system of an operating system provides little
benefits
Decreasing kernel size
• Some operating systems (like UNIX and Linux) allow
tuning kernel parameters of the operating system
• Unused features (like support for IPv6 or floppy disk drives)
can be switched off, leading to a smaller kernel size
• To create a smaller kernel, the kernel must be
recompiled or re-linked
• This is a highly automated, low risk operation on most UNIX
and Linux systems
• A restart of the operating system is needed after a kernel
rebuild
• Not all operating systems allow rebuilding the kernel
• For instance, the Windows kernel cannot be rebuilt
Decreasing kernel size
• A smaller kernel has the following benefits:
• It simplifies the kernel:
• Lower risk of crashes
• Smaller security attack surface
• The kernel must be in memory at all times
• It cannot be paged or swapped-out
• A smaller kernel will free up memory for applications and disk
caching
• Switched-off features don't need patching to keep them
up-to-date
• The operating system starts faster when the kernel is
small
Operating system security
Patching
• All operating system vendors provide small
software updates called patches:
• Fixing bugs or design flaws
• Closing security holes
• Small improvements
Patching
• In general, patches come in three categories:
• Regular patches
• Meant to fix low priority software bugs
• Some regular patches fix multiple bugs at once
• Hot-fixes
• Repairs a bug or flaw in the operating system that needs to be fixed
fast
• Used to close a security hole or to fix an error introduced by
another patch or service pack
• Hot-fixes should be installed as soon as possible
• Service packs
• Also known as support packs or patch packs
• A collection of patches and hot-fixes that are packed together and
can be installed in one deployment
• Sometimes service packs also introduce new functionality to the
operating system
Patching
• It is good practice to install all patches, hot-fixes,
and service packs as soon as possible
• Test them before deploying in production
• They could introduce unwanted effects in the
infrastructure
• Patches hot-fixes, and service packs are usually
provided with release notes
• They describe what changes are made to the operating
system
• Read release notes before installing the patch!
• When a patch or hot fix does not have impact on a
specific deployment it can be discarded
Hardening
• Hardening is a step by step process of configuring an
operating system to protect it against security threats
• The operating system is stripped down to support only
essential services and processes
• Unnecessary protocols and subsystems are switched off
• Unused user accounts are removed or disabled
• All new and relevant hot-fixes, patches, and service packs are
applied
• Harden all operating systems in the infrastructure
using a hardened operating system configuration
template
• This template is used to instantiate new operating systems
• Ensure security is optimal and is consistent in all
deployments
Virus scanning
• Windows, Linux and end user operating systems
are vulnerable to viruses
• It is good practice to install a virus scanner
• Virus scanners can have an impact on the
performance of the operating system
• The virus scanner must be configured to only scan high
risk files and directories based on a risk analysis
• For instance, it makes no sense to protect a database
table file with a virus scanner
Host-based firewalls
• Most operating systems, including Windows, Linux,
and UNIX, provide a built-in host-based firewall
• A host-based firewall is a software firewall
• Part of an operating system
• Protecting an individual host from unwanted network
traffic
• Host-based firewalls typically block all incoming
network traffic
Host-based firewalls
• Rule sets define which type of traffic is allowed to
communicate with the operating system, based on:
• Source and destination IP address
• TCP or UDP port
• The running process sending and/or receiving the
network traffic
• It is good practice to enable host-based firewalls on
all machines
• Servers
• End user devices
Limiting user accounts
• Operating systems have local user accounts that
can login to the operating system
• Most operating systems also have a special super
user account called "root", "supervisor", "admin", or
"administrator“
• These accounts have almost unlimited power
• They should be used only to provide permissions to user
accounts bound to a physical person
• Under normal circumstances, these accounts should
never be used
• It should be possible to do all work using a user-bound account
with sufficient rights
Hashed passwords
• Operating systems should only store hashed
passwords
• When a user logs in, her password is hashed
• The hashed password is compared to the stored hash
• If the two are equal the login succeeds
• There is no way to calculate or extract the original
password from the hashed one
• The hashed passwords should never be disclosed
• When weak passwords are used, brute force of dictionary
attacks can be used to find the passwords
Any Question?

You might also like