Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lesson 6: MS-DOS, Windows 10 and Linux OS: IT 311: Applied Operating System

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 96

Lesson 6: MS-DOS, Windows

10 and Linux OS

IT 311: Applied Operating System


Lesson 6: MS-DOS, Windows 10 and Linux OS

 ● MS-DOS
 ● Windows 10
 ● Linux System

IT 311: Applied Operating System


Objectives
 Illustrate, contrast and compare different structures for operating systems;
 Be acquainted with MS-DOS and LINUX OS;
 Explore the history of the UNIX operating system from which Linux is derived
and the principles upon which Linux’s design is based.
 Examine the Linux process and thread models and illustrate how Linux
schedules threads and provides interprocess communication.
 Look at memory management in Linux.
 Explore how Linux implements file systems and manages I/O devices.
 Explore the principles underlying Windows 10’s design and the specific
components of the system.
 Provide a detailed discussion of the Windows 10 file system.
 Illustrate the networking protocols supported in Windows 10.
 Describe the interface available in Windows 10 to system and application
programmers.
 Describe the important algorithms implemented with Windows 10.

IT 311: Applied Operating System


Case Study: MS DOS

 MS-DOS (Microsoft Disk Operating System) is a


single-user, single-tasking computer operating
system that uses a command line interface. In
spite of its very small size and relative simplicity, it
is one of the most successful operating systems
that has been developed to date.

IT 311: Applied Operating System


Case Study: MS DOS

A Quick and Dirty History


When IBM launched its revolutionary personal computer, the IBM PC, in
August 1981, it came complete with a 16-bit operating system from
Microsoft, MS-DOS 1.0. This was Microsoft's first operating system, and
it also became the first widely used operating system for the IBM PC and
its clones.
MS-DOS 1.0 was actually a renamed version of QDOS (Quick and Dirty
Operating System), which Microsoft bought from a Seattle company,
appropriately named Seattle Computer Products, in July 1981. QDOS
had been developed as a clone of the CP/M eight-bit operating system in
order to provide compatibility with the popular business applications of
the day such as WordStar and dBase. CP/M (Control Program for
Microcomputers) was written by Gary Kildall of Digital Research several
years earlier and had become the first operating system for
microcomputers in general use.

IT 311: Applied Operating System


Case Study: MS DOS

A Quick and Dirty History cont…


QDOS was written by Tim Paterson, a Seattle Computer Products
employee, for the new Intel 16-bit 8086 CPU (central processing unit),
and the first version was shipped in August, 1980. Although it was
completed in a mere six weeks, QDOS was sufficiently different from
CP/M to be considered legal. Paterson was later hired by Microsoft.
Microsoft initially kept the IBM deal a secret from Seattle Computer
Products. And in what was to become another extremely fortuitous move,
Bill Gates, the not uncontroversial co-founder of Microsoft, persuaded
IBM to let his company retain marketing rights for the operating system
separately from the IBM PC project. Microsoft renamed it PC-DOS (the
IBM version) and MS-DOS (the Microsoft version). The two versions
were initially nearly identical, but they eventually diverged.

IT 311: Applied Operating System


Case Study: MS DOS

A Quick and Dirty History cont…


The acronym DOS was not new even then. It had originally been used
by IBM in the 1960s in the name of an operating system (i.e., DOS/360)
for its System/360 computer. At that time the use of disks for storing the
operating system and data was considered cutting edge technology.
Until its acquisition of QDOS, Microsoft had been mainly a vendor of
computer programming languages. Gates and co-founder Paul Allen had
written Microsoft BASIC and were selling it on disks and tape mostly to
PC hobbyists.
MS-DOS soared in popularity with the surge in the PC market. Revenue
from its sales fueled Microsoft's phenomenal growth, and MS-DOS was
the key to company's rapid emergence as the dominant firm in
the software industry. This product continued to be the largest single
contributor to Microsoft's income well after it had become more famous
for Windows.

IT 311: Applied Operating System


Case Study: MS DOS

A Quick and Dirty History cont…


Subsequent versions of MS-DOS featured improved performance and
additional functions, not a few of which were copied from other operating
systems. For example, version 1.25, released in 1982, added support for
double-sided disks, thereby eliminating the need to manually turn the
disks over to access the reverse side.
Version 2.0, released the next year, added support for directories, for
IBM's then huge 10MB hard disk drive (HDD) and for 360KB, 5.25-inch
floppy disks. This was followed by version 2.11 later in the same year,
which added support for foreign and extended characters.
Version 3.0, launched in 1984, added support for 1.2MB floppy disks
and 32MB HDDs. This was soon followed by version 3.1, which added
support for networks.

IT 311: Applied Operating System


Case Study: MS DOS

A Quick and Dirty History cont…


Additions and improvements in subsequent versions included support
for multiple HDD partitions, for disk compression and for larger partitions
as well as an improved disk-checking utility,
enhanced memory management, a disk defragmenter and an
improved text editor.
The final major version was 7.0, which was released in 1995 as part of
Microsoft Windows 95. It featured close integration with that operating
system, including support for long filenames and the removal of
numerous utilities, some of which were on the Windows 95 CDROM. It
was revised in 1997 with version 7.1, which added support for the
FAT32 filesystems on HDDs.

IT 311: Applied Operating System


Case Study: MS DOS

A Quick and Dirty History cont…


Although many of the features were copied from UNIX, MS-DOS was
never able to come anywhere close to UNIX in terms of performance or
features. For example, MS-DOS never became a serious multi-user
or multitasking operating system (both of which were core features of
UNIX right from the start) in spite of attempts to retrofit these capabilities.
Multitasking is the ability for a computer to run two or
more programs simultaneously.

IT 311: Applied Operating System


Case Study: MS DOS

The Rise of the GUI


The introduction of the Apple Macintosh in 1984 brought about a surge
of interest in GUIs (graphical user interfaces), and it soon became
apparent that they would eventually replace command line interfaces
such as that used by MS-DOS. Although many MS-DOS application
programs created their own primitive GUIs, this approach required
duplication of programming effort, and the lack of a consistent GUI
among programs made it more difficult for users to learn new programs.
It took Microsoft years until it was able to offer a fairly high quality GUI
of its own, with the introduction of Windows 95 in 1995 (or arguably with
Windows 3.0 in 1990). Microsoft had also begun work on a joint project
with IBM called OS/2, which was originally a protected-mode version of
MS-DOS with a GUI, but Microsoft soon abandoned the project in order
to devote more resources to the development of Windows NT, a
completely new operating system that was independent of MS-DOS.

IT 311: Applied Operating System


Case Study: MS DOS

The Rise of the GUI cont…


Protected mode and real mode are the two modes of operation supported
by the Intel x86 architecture. The former enables 32-bit memory addressing,
thereby permitting use of the extended memory that cannot be easily
accessed from real mode. This makes it possible to assign separate memory
areas to the operating system kernel (i.e., the core of the operating system)
and to each process (i.e., program or task), thus resulting in much more
stable multitasking than can be attained with real mode.
Early versions of Microsoft Windows ran under MS-DOS, whereas later
versions were launched under MS-DOS but were then extended by going
into protected mode. Windows NT and its successors, Windows 2000 and
XP, do not use MS-DOS; however, they contain an emulation layer on which
MS-DOS programs can be operated, mainly for backward compatibility
with legacy (i.e., old) software.

IT 311: Applied Operating System


Case Study: MS DOS

DOS Commands
MS-DOS has a relatively small number of commands, and
an even smaller number of commonly used ones. Moreover,
these commands are generally inflexible because, in contrast
to Linux and other Unix-like operating systems, they are
designed to accommodate few options or arguments (i.e.,
values that can be passed to the commands).

IT 311: Applied Operating System


Case Study: MS DOS

DOS Commands cont…


Some of the most common commands are as follows (corresponding
commands on Unix-like operating systems are shown in parenthesis):
 CD - changes the current directory (cd)
 COPY - copies a file (cp)
 DEL - deletes a file (rm)
 DIR - lists directory contents (ls)
 EDIT - starts an editor to create or edit plain text files (vi, vim, ed, joe)
 FORMAT - formats a disk to accept DOS files (mformat)
 HELP - displays information about a command (man, info)
 MKDIR - creates a new directory (mkdir)
 RD - removes a directory (rmdir)
 REN - renames a file (mv)
 TYPE - displays contents of a file on the screen (more, cat)

IT 311: Applied Operating System


Case Study: MS DOS

Comparison between MS-DOS and Linux


MS-DOS and Linux have much in common, primarily because MS-DOS
copied many ideas from UNIX. However, there are some very
fundamental differences, including:
1. Linux is a full-fledged multiuser, multitasking operating system, whereas
MS-DOS is a single-user, single-tasking operating system.
2. MS-DOS does not have built-in security concepts such as file-ownership
and permissions, which are fundamental to Linux.
3. Linux has an inverted tree-like filesystem in which all directories and files
branch from a single directory, i.e., the root directory, and its
subdirectories. MS-DOS can have multiple, independent root directories,
such as A:, C:, D:, etc.
4. Linux uses forward slashes "/" to separate directories, whereas MS-DOS
uses backslashes "\" for the same purpose.

IT 311: Applied Operating System


Case Study: MS DOS

Comparison between MS-DOS and Linux cont…


5. Linux filenames can contain up to 255 characters. MS-DOS filenames are
limited to an eight characters plus a three-character extension and have
restrictions on allowable characters. Also, filenames are case-sensitive in
Linux, whereas they are not in MS-DOS.
6. Linux has a vastly richer command set than does MS-DOS, with a much
greater number of commands and individual commands having greater
power, flexibility and ease of use. Commands are case-sensitive in Linux,
but they are not in MS-DOS.
7. Although Linux and MS-DOS both have pipes and input/output redirection,
the MS-DOS pipes use a completely different -- and inferior --
implementation.
8. MS-DOS is not sufficiently flexible and efficient to serve as a base for a
high quality, general-purpose GUI (and thus it had to be abandoned by
Microsoft). In sharp contrast, Linux is an excellent base for a GUI (and it is
used as a base for the X Window System, which is extremely configurable
and whose already excellent performance continues to improve).

IT 311: Applied Operating System


Case Study: MS DOS

MS-DOS Clones and Emulators


The great success of MS-DOS led to the development of several similar
operating systems, including DR-DOS, FreeDOS, OpenDOS and PC-DOS.
The most promising of these clones is FreeDOS, which is claimed to be the
only free operating system that is fully compatible with MS-DOS.
Development of FreeDOS was begun in 1994 by Jim Hall, then a physics
student at the University of Wisconsin-River Falls. His motivation was
Microsoft's announcement that it would stop supporting MS-DOS because
of its impending replacement by Windows 95.
Like MS-DOS, FreeDOS is lean and robust, and it can run on old
hardware and in embedded systems. A major improvement as compared
with MS-DOS is the addition of options to the commands. Moreover,
FreeDOS is released under the GPL (although some software in the
distribution is covered by other licenses), thus making it ideal for bundling a
version of DOS into products without having to pay royalties.

IT 311: Applied Operating System


Case Study: MS DOS

MS-DOS Clones and Emulators cont


Because Linux was originally developed on PCs and at a time when MS-DOS
was the dominant PC operating system, a variety of tools were developed to
help developers and users bridge the gap between the two operating systems.
Among them is dosemu, a DOS emulator which is included with Red Hat and
other distributions and on which it is possible to run DOS programs. Emulators
are also available for running DOS on other Unix-like operating systems, even
on non-x86 processors.
mtools is a collection of utilities that make it easy to access an MS-DOS
floppy disk from Linux by merely inserting it into the floppy disk drive and
without having to use any mounting commands (which can be tricky for
inexperienced users). Included in mtools are more than 20 commands, all of
which are identical to their MS-DOS counterparts except that the letter m is
added to the start of each of their names and forward slashes are used instead
of backslashes. For example, the MS-DOS command type a:\file1.txt to display
the contents of a file named file1.txt that is located on a floppy disk would
become mtype a:/file1.txt.

IT 311: Applied Operating System


Case Study: MS DOS

Outlook For the Future


Although it is widely believed that MS-DOS is an antiquated and useless
operating system with few features and capabilities, this is far from correct. In fact,
although not generally publicized, MS-DOS is still used today by numerous
businesses and individuals around the world. A good analogy is the ancient
programming language COBOL (introduced in 1960!), which is still in widespread
use and, amazingly, accounts for roughly half of all the computer code still in
existence. Both MS-DOS and COBOL have survived for so long because they are
robust, relatively simple and continue to get the job done with a minimum of
maintenance.
In many cases, it was not MS-DOS itself that was the limiting factor in system
performance; rather, it was the hardware, including small memories, slow CPUs
and slow video cards. The capabilities of MS-DOS have, in fact, continued to
increase even after Microsoft Windows became widespread. This is a result of
continuing advances in the hardware and the introduction of new or improved
utilities and applications. DOS as a whole is also being strengthened by the
improvements that are being made to the MS-DOS clones, particularly FreeDOS.

IT 311: Applied Operating System


Case Study: MS DOS

Outlook For the Future cont…


DOS will be around for many years into the future not only because of
the continued existence of legacy applications but also because of the
development of new applications. The main area of growth will most likely
be simple embedded applications, for which DOS is eminently well suited
because of its extremely small size, very reliable operation and zero cost
(in the case of FreeDOS).
DOS is so tiny, in fact, that it can fit on a single floppy disk and still leave
sufficient room on the same disk for an embedded program and data
files. Although there are many alternatives for embedded systems,
including embedded Linux and Microsoft Windows CE, DOS can be the
best choice if space is severely limited. Moreover, in contrast to
FreeDOS, Windows CE has the disadvantages of not being free and
having various licensing issues with which to contend.

IT 311: Applied Operating System


Case Study: MS DOS

 For more information about MS Dos


 Watch: https://www.youtube.com/watch?v=5cS-PIuyEhU

IT 311: Applied Operating System


Case Study: Windows 10

 The Microsoft Windows 10 operating system is a preemptive


multitasking client operating system for microprocessors
implementing the Intel IA-32,
AMD64,ARM,andARM64instructionsetarchitectures(ISAs).Mi
crosoft’scorrespondingserveroperatingsystem,WindowsServ
er2016,isbasedonthesame code as Windows 10 but
supports only the 64-bit AMD64 ISAs.
 Windows 10 is the latest in a series of Microsoft operating
systems based on its NT code, which replaced the earlier
systems based on Windows 95/98. In this chapter,
wediscussthekeygoalsofWindows10,thelayeredarchitectureo
fthesystem that has made it so easy to use, the file system,
the networking features, and the programming interface.

IT 311: Applied Operating System


Case Study: Windows 10

History
Inthemid-1980s,Microsoftand IBM cooperatedtodevelopthe
OS/2 operating system, which was written in assembly
language for single-processor Intel 80286 systems. In 1988,
Microsoft decided to end the joint effort with IBM and develop
its own “new technology” (or NT) portable operating system
to support both the OS/2 and POSIX application
programming interfaces (APIs). In October 1988, Dave
Cutler, the architect of the DECVAX/VMS operating system,
was hired and given the charter of building Microsoft’s new
operating system.

IT 311: Applied Operating System


Case Study: Windows 10

History cont…
Windows XP, Vista, and 7
In October 2001, Windows XP was releasedas both an update to
the Windows 2000 desktop operating system and are placement for
Windows 95/98. In April 2003, the server edition of Windows XP
(called Windows Server 2003) became available. Windows XP
updated the graphical user interface (GUI) with a visual design that
took advantage of more recent hardware advances and many new
ease-of-use features.
Windows 7, which was released in October 2009, along with
corresponding server edition called Windows Server 2008 R2.
Among the significant engineering changes was the increased use
of event tracing rather than counters or profiling to analyze system
behavior.
IT 311: Applied Operating System
Case Study: Windows 10

History cont…
Windows 8
Three years later, in October 2012—amid an industry-wide pivot
toward mobile computing and the world of apps—Microsoft
released Windows 8, which represented the most significant
change to the operating system since Windows XP. Windows 8
included a new user interface (named Metro) and a new
programming model API (named WinRT).

IT 311: Applied Operating System


Case Study: Windows 10

History cont…
Windows 10
 Windows 10 in July 2015 and its server companion, Windows
Server 2016, in October 2016, Microsoft shifted to a “Windows as-
a-Service” (WaaS) model (with included periodic functionality
improvements). Windows 10 receives monthly incremental
improvements called “feature rollups,” as well as eight-month
feature releases called “updates.”
Windows 10 reintroduced the start menu, restored keyboard
support, and deemphasized full-screen applications and live tiles.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles
Microsoft’s design goals for Windows included:
 Security
 Reliability
 Compatibility
 High performance
 Extensibility
 Portability
 International support.
Some additional goals, such as energy efficiency and dynamic
device support, have recently been added to this list. Next, we
discuss each of these goals and how each is achieved in Windows
10.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


Security
 Windows 10 make it possible to opt in to a new security feature
called Device Guard. This mechanism allows organizations to
customize the digital signing requirements of their computer
systems, as well as blacklist and whitelist individual signing
certificates or even binary hashes. For example, an organization
could choose to allow only user-mode programs signed by
Microsoft, Google, or Adobe to launch on their enterprise
computers.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


Reliability
 Microsoft is building an ever-improving picture of what is
happening in the Windows ecosystem that allows continuous
improvements through software updates as well as providing data
to guide future releases of Windows.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


Windows and Application Compatibility
Final compatibility measure, Windows 8.1 and later versions also
include the Hyper-V for Client feature. This allows applications to
get bugfor-bug compatibility with Windows XP, Linux, and even
DOS by running these operating systems inside a virtual machine.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


Performance
Windows 10, the native graphics stack and many new Windows
applications make use of Direct Compute, and new versions of
Task Manager track GPU processor and memory usage, with
DirectX now having its own GPU thread scheduler and GPU
memory manager.
 DirectCompute, allows programs to specify computational
kernels using the “high-level shader language” programming
model used by SIMD hardware.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


Extensibility
Extensibility refers to the capability of an operating system to
keep up with advances in computing technology.
Windows implements the Distributed Common Object Model
(DCOM) infrastructure, as well as the Windows Management
Instrumentation (WMI) and Windows Remote Management
(WinRM) mechanism, all of which can be used to rapidly extend
the system with new services and management capabilities.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


Portability
An operating system is portable if it can be moved from one CPU
architecture to another with relatively few changes. Windows was
designed to be portable. Like the UNIX operating system, Windows is
written primarily in C and C++.
Windows has been ported to a number of different CPU architectures:
Intel IA-32-compatible 32-bit CPUs, AMD64-compatible and IA64 64-bit
CPUs, and DEC Alpha, DEC Alpha AXP64, MIPS, and PowerPC CPUs.
Most of these CPU architectures failed in the consumer desktop market.
When Windows 7 shipped, only the IA-32 and AMD64 architectures were
supported on client computers, along with AMD64 on servers. With
Windows 8, 32-bit ARM was added,and Windows 10 now supports
ARM64 as well.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


International Support
Windows was designed for international and multinational use. It
provides support for different locales via the national-language-support
(NLS) API. The NLS API provides specialized routines to format dates,
time, and money in accordance with national customs.
Linux’s and the Web’s standard UTF-8). Windows supports ANSI
characters by converting them to UNICODE characters before
manipulating them (8-bit to 16-bit conversion).
System text strings are kept in resource tables inside files that can be
replaced to localize the system for different languages.

IT 311: Applied Operating System


Case Study: Windows 10

Design Principles cont…


Energy Efficiency
Increasing energy efficiency causes batteries to last longer for laptops
and Internet-only netbooks, saves significant operating costs for power
and cooling of data centers, and contributes to green initiatives aimed at
lowering energy consumption by businesses and consumers.
Dynamic Device Support
Dynamic configuration of devices is continually evolving in Windows.
The system can automatically recognize devices when they are plugged
in and can find, install, and load the appropriate drivers— often without
user intervention. When devices are unplugged, the drivers automatically
unload, and system execution continues without disrupting other
software.

IT 311: Applied Operating System


Case Study: Windows 10

System Components
The architecture of Windows is a layered system of modules operating
at specific privilege levels. By default, these privilege levels are first
implemented by the processor (providing a “vertical” privilege isolation
between user mode and kernel mode).
Windows 10 can also use its Hyper-V hypervisor to provide an
orthogonal (logically independent) security model through Virtual Trust
Levels (VTLs). When users enable this feature, the system operates in a
Virtual Secure Mode (VSM). In this mode, the layered privileged system
now has two implementations, one called the Normal World, or VTL 0,
and one called the Secure World, or VTL 1. Within each of these worlds,
we find a user mode and a kernel mode.

IT 311: Applied Operating System


Case Study: Windows 10

System Components cont…


System Components layers and subsystems.
 Hyper-V Hypervisor – first component initialized on a system with
VSM enabled, which happens as soon as the user enables the
Hyper-V component. It is used both to provide hardware
virtualization features for running separate virtual machines and to
provide the VTL boundary and related access to the hardware’s
Second Level Address Translation (SLAT) functionality (discussed
shortly).
 Secure Kernel – acts as the kernel-mode environment of isolated
(VTL1) user mode Trustlet applications (applications that
implement parts of the Windows security model). It provides the
same system-call interface that the kernel does, so that all
interrupts, exceptions, and attempts to enter kernel mode from a
VTL1Trustletresultinenteringthesecurekernelinstead.

IT 311: Applied Operating System


Case Study: Windows 10

System Components cont…


System Components layers and subsystems.
 Hardware-Abstraction Layer – The HAL is the layer of software
that hides hardware chipset differences from upper levels of the
operating system. The HAL exports a virtual hardware interface
that is used by the kernel dispatcher, the executive, and the device
drivers.
 Kernel – The kernel layer of Windows has the following main
responsibilities:
 thread scheduling and context switching
 low-level processor synchronization
 interrupt and exception handling
 switching between user mode and kernel mode through the
system-call interface.

IT 311: Applied Operating System


Case Study: Windows 10

System Components cont…


System Components layers and subsystems.
 Executive - The Windows executive provides a set of services
that all environment subsystems use. To give you a good basic
overview, we discuss the following services here:

IT 311: Applied Operating System


Case Study: Windows 10

Terminal Services and Fast User Switching


Windows supports a GUI-based console that interfaces with the user via
keyboard, mouse, and display. Most systems also support audio and
video.
 For example, audio input is used by Cortana, Windows’s voice-
recognition and virtual assistant software, which is powered by
machine learning. Cortana makes the system more convenient
and can also increase its accessibility for users with motor
disabilities.

IT 311: Applied Operating System


Case Study: Windows 10

File System
The native file system in Windows is NTFS. It is used for all local
volumes.
FAT is a much older file-system format that is understood by many
systems besides Windows, such as the software running on cameras.
 A disadvantage is that the FAT file system does not restrict file
access to authorized users. The only solution for securing data
with FAT is to run an application to encrypt the data before storing
it on the file system.

IT 311: Applied Operating System


Case Study: Windows 10

File System cont…


NTFS Internal Layout – The fundamental entity in NTFS (New Technology
File System) is the volume. A volume is created by the Windows logical disk
management utility and is based on a logical disk partition. A volume may
occupy a portion of a device or an entire device, or may span
several devices. The volume manager can protect the contents of the
volume with various levels of RAID.
Recovery - a power failure at the wrong time can damage the file-
system data structures so severely that the entire volume is
scrambled. From crashes by using the fsck program to check all the file-
system data structures and restore/recover them forcibly to a
consistent state. Restoring/recovering them often involves deleting
damaged files and freeing data clusters that had been written with user
data but not properly recorded in the file system’s metadata structures.

IT 311: Applied Operating System


Case Study: Windows 10

File System cont…


Security - The security of an NTFS volume is derived from the Windows
object model. Each NTFS file references a security descriptor, which
specifies the owner of the file, and an access- control list, which contains the
access permissions granted or denied to each user or group listed.
Compression - NTFS can perform data compression on individual files or on
all data files in a directory. To compress a file, NTFS divides the file’s data
into compression units, which are blocks of 16 contiguous clusters.
Mount Points, Symbolic Links, and Hard Links – Amount point is implemented
as a symbolic link with associated data. symbolic links, similar to those found
in UNIX. The links can be absolute or relative, can point to objects that do not
exist, and can point to both files and directories even across volumes. NTFS
also supports hard links, where a single file has an entry in more than one
directory of the same volume.containing the true volume name.
Change Journal
Volume Shadow Copies

IT 311: Applied Operating System


Case Study: Windows 10

File System cont…


Mount Points, Symbolic Links, and Hard Links – Amount point is
implemented as a symbolic link with associated data containing the true
volume name.. symbolic links, similar to those found in UNIX. The links
can be absolute or relative, can point to objects that do not exist, and
can point to both files and directories even across volumes. NTFS
also supports hard links, where a single file has an entry in more
than one directory of the same volume.
Change Journal - NTFS keeps a journal describing all changes that
have been made to the file system.
Volume Shadow Copies - Windows implements the capability of
bringing a volume to a known state and then creating a shadow copy
that can be used to back up a consistent view of the volume. This
technique is known as snapshots in some other file systems.

IT 311: Applied Operating System


Case Study: Windows 10

Networking
Windows supports both peer-to-peer and client–server networking. It
also has facilities for network management. The networking
components in Windows provide data transport, interprocess
communication, file sharing across a network, and the ability to send
print jobs to remote printers.
Network Interfaces – To describe networking in Windows, we must
first mention two of the internal networking interfaces:
 The Network Device Interface Specification (NDIS)
 NDIS resides at the interface between the data-link and network layers in
the ISO model and enables many protocols to operate over many
different network adapters.
 The Transport Driver Interface (TDI).
 The TDI supports both connection-based and connectionless transport
and has functions to send any type of data.

IT 311: Applied Operating System


Case Study: Windows 10

Networking cont…
Protocols – Windows implements transport protocols as drivers. These
drivers can be loaded and unloaded from the system dynamically,
although in practice the system typically has to be rebooted after a
change.
 Server Message Block - protocol was first introduced in MS-DOS 3.1.
The system uses the protocol to send I/O requests over the network.
A version of the SMB protocol was published as the Common Internet
File System (CIFS) and is supported on a number of operating systems.
 Transmission Control Protocol/Internet Protocol – The
transmission control protocol/Internet protocol (TCP/IP) suite that is used
on the Internet has become the de facto standard networking
infrastructure. Windows uses TCP/IP to connect to a wide variety of
operating systems and hardware platforms. The Windows TCP/IP
package includes the simple network-management protocol (SNMP), the
dynamic host-configuration protocol (DHCP), and the older Windows
Internet name service (WINS).

IT 311: Applied Operating System


Case Study: Windows 10

Networking cont…
 Point-to-Point Tunneling Protocol - protocol provided by Windows to
communicate between remote-access server modules running on
Windows server machines and other client systems that are
connected over the Internet. The remote-access servers can encrypt
data sent over the connection, and they support multiprotocol virtual
private networks (VPNs) on the Internet.
 HTTP Protocol – is used to get/put information using the World Wide Web.
Windows implements HTTP using a kernel-mode driver, so web
servers can operate with a low-overhead connection to the networking
stack.
 Web-Distributed Authoring and Versioning Protocol - Web-
distributed authoring and versioning (WebDAV) is anHTTP-based
protocol for collaborative authoring across a network. Windows builds a
WebDAV redirector into the file system. Being built directly into the file
system enables WebDAV to work with other file-system features, such as
encryption. Personal files can then be stored securely in a public place.

IT 311: Applied Operating System


Case Study: Windows 10

Networking cont…
 Named Pipes - area connection-oriented messaging mechanism. A
process can use named pipes to communicate with other processes on the
same machine.
 Remote Procedure Calls – are client–server mechanisms that enable
an application on one machine to make a procedure call to code on
another machine. The client calls a local procedure—a stub routine
— which packs its arguments into a message and sends them across
the network to a particular server process.
 Component Object Model - is a mechanism for interprocess
communication that was developed for Windows. A COM object provides
a well defined interface to manipulate the data in the object.

IT 311: Applied Operating System


Case Study: Windows 10

Networking cont…
Redirectors and Servers – A redirector is the client-side object that
forwards I/O requests to a remote system, where they are satisfied by
a server. For performance and security, there directors and servers
run in kernel mode.
 Distributed File System - Windows supports a distributed file-syste
(DFS) protocol that allows a network administrator to serve up
files from multiple servers using a single distributed name space.
 Folder Redirection and Client-Side Caching – To improve the PC
experience for users who frequently switch among computers,
Windows allows administrators to give users roaming profile ,
which keep users’ preferences and other settings on servers.
Folder redirection is then used to automatically store a user’s
documents and other files on a server. Windows uses client-side
caching (CSC). CSC is also used when the computer is on-line to keep
copies of the server files on the local machine for better performance.

IT 311: Applied Operating System


Case Study: Windows 10

Networking cont…
Domains – Windows domain is a group of Windows workstations
and servers that share a common security policy and user database.
Active Directory - Active Directory is the Windows implementation of
Lightweight Directory Access Protocol (LDAP) services. Active
Directory stores the topology information about the domain, keeps the
domain-based user and group accounts and passwords, and provides
a domain-based store for Windows features that need it, such as
Windows group policy.
 Administrators use group policies to establish uniform
standards for desktop preferences and software. For many
corporate information-technology groups, uniformity drastically
reduces the cost of computing.

IT 311: Applied Operating System


Case Study: Windows 10

Programmer Interface
The Win32 API is the fundamental interface to the capabilities of
Windows. This section describes five main aspects of the Win32 API:
 access to kernel objects,
 sharing of objects between processes,
 process management,
 interprocess communication,
 memory management.

IT 311: Applied Operating System


Case Study: Windows 10

 For more information about Windows 10


 Watch: https://www.youtube.com/watch?v=8d9FY3LpR4E
https://www.youtube.com/watch?v=2medem4yQ2c

IT 311: Applied Operating System


Case Study: Linux
 Linux is a variant of UNIX that has gained
popularity over the last several decades, powering
devices as small as mobile phones and as large
as room filling super computers.
 Linux is a rapidly evolving operating system.

IT 311: Applied Operating System


Case Study: Linux
Linux History
Linux looks and feels much like any other UNIX system; in deed, UNIX
compatibility has been a major design goal of the Linux project.
The development began in 1991, when a Finnish university student, Linus
Torvalds, began creating a small but self contained kernel for the 80386
processor, the first true 32-bit processor in Intel’s range of PC-compatible
CPUs.
Linux kernel is an original piece of software developed from scratch by the
Linux community. The Linux system, as we know it today, includes a
multitude of components, some written from scratch, others borrowed from
other development projects, and still others created in collaboration with other
teams.
A Linux distribution includes all the standard components of the Linux
system, plus a set of administrative tools to simplify the initial installation and
subsequent upgrading of Linux and to manage installation and removal of
other packages on the system.

IT 311: Applied Operating System


Case Study: Linux
Linux History cont…
The Linux Kernel
 The first Linux kernel released to the public was version 0.01, dated May
14, 1991. It had no networking, ran only on 80386-compatible Intel
processors and PC hardware, and had extremely limited device-driver
support.
 Linux1.0, was released on March 14, 1994. This release culminated
three years of rapid development of the Linux kernel. Perhaps the single
biggest new feature was networking:
 1.0 included support for UNIX’s standard TCP/IP networking protocols,
 BSD-compatible socket interface for networking programming.
 Device-driver support was added for running IP over Ethernet or (via the PPP
or SLIP protocols) over serial lines or modems.
 Enhanced file system without the limitations of the original Minix file system,
and it supported a range of SCSI controllers for high-performance disk
access.

IT 311: Applied Operating System


Case Study: Linux
Linux History cont…
The Linux System
 The Linux system as a whole is maintained by a loose network of
developers collaborating over the Internet, with small groups or
individuals having responsibility for maintaining the integrity of
specific components. A small number of public Internet file-
transfer-protocol (FTP) archive sites act as de facto standard
repositories for these components.
 The File System Hierarchy Standard document is also maintained by
the Linux community as a means of ensuring compatibility across the
various system components. This standard specifies the overall layout of a
standard Linux file system; it determines under which directory names
configuration files, libraries, systembinaries,and run-time data files should
be stored.

IT 311: Applied Operating System


Case Study: Linux
Linux History cont…
The Linux Distribution
 Distributions, include much more than just the basic Linux system.
They typically include extra system-installation and management
utilities, as well as precompiled and ready-to-install packages of
many of the common UNIX tools, such as news servers, web
browsers, text-processing and editing tools, and even games.
 SLS (Softlanding Linux System) distribution, dating back to the
early days of Linux, was the first collection of Linux packages that
was recognizable as a complete distribution.
 The Slackware distribution represented a great improvement in
overall quality, even though it also had poor package management.
 Red Hat and Debian are particularly popular distributions; the first
comes from a commercial Linux support company and the second
from the free-software Linux community.

IT 311: Applied Operating System


Case Study: Linux
Linux History cont…
The Linux Licensing
 The Linux kernel is distributed under version 2.0 of the GNU's Not
Unix (GNU) General Public License(GPL), the terms of which are
set out by the Free Software Foundation.
 Linux is not public-domain software. Public domain implies that the
authors have waived copyright rights in the software, but copyright
rights in Linux code are still held by the code’s various authors.
 Linux is free software, how ever, in the sense that people can copy
it, modify it, use it in any manner they want, and give away (or sell)
their own copies.
 Linux’s licensing terms is that nobody using Linux, or creating a
derivative of Linux (a legitimate exercise), can distribute the
derivative without including the source code.

IT 311: Applied Operating System


Case Study: Linux
Design Principles
 Linux resembles other traditional, nonmicrokernel UNIX
implementations. It is a multiuser, preemptively
multitasking system with a full set of UNIX-compatible
tools. Linux’s file system adheres to traditional UNIX
semantics, and the standard UNIX networking model is
fully implemented.
PCs became more powerful and as memory and hard disks
became cheaper, the original, minimalist Linux kernels grew
to implement more UNIX functionality. Speed and efficiency
are still important design goals, but much recent and current
work on Linux has concentrated on a third major design goal:
standardization.

IT 311: Applied Operating System


Case Study: Linux
Design Principles cont…
Components of a Linux System
 The Linux system is composed of three main bodies of code, in line
with most traditional UNIX implementations:
 Kernel. The kernel is responsible for maintaining all the important abstractions of
the operating system, including such things as virtual memory and processes.
 System libraries. The system libraries define a standard set of functions through
which applications can interact with the kernel. These functions implement much of
the operating-system functionality that does not need the full privileges of kernel
code. The most important system library is the C library, known as lib c. It
implements the user mode side of the Linux system call interface, as well as other
critical system-leve linterfaces.
 System utilities. The system utilities are programs that perform individual,
specialized management tasks. Some system utilities are invoked just once to
initialize and configure some aspect of the system. Others— known as daemons in
UNIX terminology—run permanently, handling such tasks as responding to
incoming network connections, accepting logon requests from terminals, and
updating log files.

IT 311: Applied Operating System


Case Study: Linux
Design Principles cont…
Components of a Linux System
 This figure illustrates the various components that make up a full
Linux system. The most important distinction here is between the
kernel and everything else.

IT 311: Applied Operating System


Case Study: Linux
Kernel Modules
The Linux kernel has the ability to load and unload arbitrary sections of
kernel code on demand.
Kernel modules are convenient for several reasons. Linux’s source
code is free, so anybody wanting to write kernel code is able to compile
a modified kernel and to reboot into that new functionality.
The module support under Linux has four components:
1. The module-management system allows modules to be loaded into memory and
to communicate with the rest of the kernel.
2. The module loader and unloader, which are user-mode utilities, work with the
module-management system to load a module into memory.
3. The driver-registration system allows modules to tell the rest of the kernel that a
new driverhas become available.
4. A conflict-resolution mechanism allows different device drivers to reserve
hardware resources and to protect those resources from accidental use by another
driver.

IT 311: Applied Operating System


Case Study: Linux
Process Management
A process is the basic context in which all user-requested
activity is serviced within the operating system. To be
compatible with other UNIX systems, Linux must use a process
model similar to those of other versions of UNIX. Linux
operates differently from UNIX in a few key places
The fork() and exec() Process Model
 The basic principle of UNIX process management is to separate
into two steps two operations that are usually combined into one:
the creation of a new process and the running of a new program.
A new process is created by the fork() system call,
A new program is run after a call to exec().

IT 311: Applied Operating System


Case Study: Linux
Process Management cont…
The fork() and exec() Process Model
 Process properties fall into three groups:
 The process identity consists mainly of the following items:
– Process ID (PID). Each process has a unique identifier. The PID
is used to specify the process to the operating system when an
application makes a
– Credentials. Each process must have an associated user ID and
one or more group IDs that determine the rights of a process to
access system resources and files.
– Personality. Are not traditionally found on UNIX systems, but
under Linux each process has an associated personality identifier
that can slightly modify the semantics of certain system calls.
Personalities are primarily used by emulation libraries to request
that system calls be compatible with certain varieties of UNIX.

IT 311: Applied Operating System


Case Study: Linux
Process Management cont…
– Namespace. Each process is associated with a specific view of
the file system hierarchy, called its namespace. Most processes
share a common namespace and thus operate on a shared file-
system hierarchy. Processes and their children can, however,
have different namespaces, each with a unique file-system
hierarchy—their own root directory and set of mounted file
systems.
 The environment - is inherited from its parent and is composed of
two null-terminated vectors:
– The argument vector simply lists the command-line arguments
used to invoke the running program; it conventionally starts with
the name of the program itself.
– The environment vector is not held in kernel memory but is
stored in the process’s own user-mode address space as the first
datum at the top of the process’s stack.

IT 311: Applied Operating System


Case Study: Linux
Process Management cont…
 The context includes the following parts:
– Scheduling context. information that the scheduler needs to
suspend and restart the process. This information includes
saved copies of all the process’s registers. It includes
information about scheduling priority and about any
outstanding signals waiting to be delivered to the process.
– Accounting. The kernel maintains accounting information
about the resources currently being consumed by each
process and the total resourcesconsumed by the process in
its entire lifetime so far.
– File table. The file table is an array of pointers to kernel file
structures representing open files.

IT 311: Applied Operating System


Case Study: Linux
Process Management cont…
– File-system context. Whereas the file table lists the existing
open files, the file-system context applies to requests to
open new files. The file-system context includes the
process’s root directory, current working directory, and
namespace.
– Signal-handlertable. UNIX systems can deliver asynchronous
signals to a process in response to various external events. The
signal-handler table defines the action to take in response to a
specific signal. Valid actions include ignoring the signal,
terminating the process, and invoking a routine in the process’s
address space.
– Virtual memory context. The virtual memory context describes
the full contents of a process’s private address space.

IT 311: Applied Operating System


Case Study: Linux
Process Management cont…
Processes and Threads
 Linux provides the fork() system call, which duplicates a
process without loading a new executable image. Linux also
provides the ability to create threads via the clone() system
call.
 Linux does not distinguish between processes and threads,
however. In fact, Linux generally uses the term task— rather
than process or thread—when referring to a flow of control
within a program. The clone() system call behaves identically
to fork(), except that it accepts as arguments a set of flags
that dictate what resources are shared between the parent
and child (whereas a process created with fork() shares no
resourceswith its parent). The flags include:

IT 311: Applied Operating System


Case Study: Linux
Process Management cont…
 The flags include:

IT 311: Applied Operating System


Case Study: Linux
Scheduling
Scheduling is the job of allocating CPU time to different tasks
within an operating system. Linux, like all UNIX systems,
supports preemptive multitasking.
Scheduling as the running and interrupting of user threads, but
another aspect of scheduling is also important in Linux: the
running of the various kernel tasks. Kernel tasks encompass
both tasks that are requested by a running thread and tasks
that execute internally on behalf of the kernel itself, such as
tasks spawned by Linux’s I/O subsystem

IT 311: Applied Operating System


Case Study: Linux
Scheduling cont…
Thread Scheduling
 Linux has two separate process-scheduling algorithms. One is
a time-sharing algorithm for fair, preemptive scheduling among
multiple threads. The other is designed for real-time tasks,
where absolute priorities are more important than fairness.
 The scheduling algorithm used for routine time-sharing tasks
received a major overhaul with version 2.6 of the kernel. the
thread scheduler was overhauled a second time, with Linux
kernel version2.6. This version us hered in the Completely
Fair Scheduler (CFS).
 The Linux scheduler is a preemptive, priority-based algorithm
with two separate priority ranges: a real-time range from 0 to
99 and a nice value ranging from −20 to 19.

IT 311: Applied Operating System


Case Study: Linux
Scheduling cont…
Real-Time Scheduling
 Linux’s real-time scheduling algorithm is significantly simpler
than the fair scheduling employed for standard time-sharing
threads. Linux implements the two real-time scheduling
classes required by POSIX.1b:
 first-come, first served (FCFS)
 round-robin

 Linux’s real-time scheduling is soft—rather than hard—real


time. The scheduler offers strict guarantees about the
relative priorities of real-time threads, but the kernel does not
offer any guarantees about how quickly a realtime thread will
be scheduled once that thread becomes runnable.

IT 311: Applied Operating System


Case Study: Linux
Scheduling cont…
Kernel Synchronization
 The kernel schedules its own operations is
fundamentally different from the way it schedules
threads. A request for kernel-mode execution can occur
in two ways.
A running program may request an operating-system
service, either explicitly via a system call or implicitly
—for example, when a page fault occurs.
A device controller may deliver a hardware interrupt
that causes the CPU to start executing a kernel-
defined handler for that interrupt.

IT 311: Applied Operating System


Case Study: Linux
Scheduling cont…
Kernel Synchronization
 Linux implements this architecture by separating interrupt
service routines into two sections:
The top half is the standard interrupt service routine that
runs with recursive interrupts disabled. Interrupts of the
same number (or line) are disabled, but other interrupts
may run.
The bottom half of a service routine is run, with all
interrupts enabled, by a miniature scheduler that
ensures that bottom halves never interrupt them selves.
The bottom-half scheduler is invoked automatically
whenever an interrupt service routine exits.

IT 311: Applied Operating System


Case Study: Linux
Scheduling cont…
Symmetric Multiprocessing
 The Linux 2.0 kernel was the first stable Linux kernel to
support symmetric multiprocessor (SMP) hardware,
allowing separate threads to execute in parallel on
separate processors. The original implementation of
SMP imposed the restriction that only one processor at
a time could be executing kernel code.
 In version 2.2 of the kernel, a single kernel spinlock
(sometimes termed BKL for “big kernel lock”) was
created to allow multiple threads (running on different
processors) to be active in the kernel concurrently.

IT 311: Applied Operating System


Case Study: Linux
Scheduling cont…
Symmetric Multiprocessing
 The 3.0 and 4.0 kernels provided additional SMP
enhancements, including ever-finer locking, processor
affinity, load-balancing algorithms, and support for
hundreds or even thousands of physical processors in
a single system.

IT 311: Applied Operating System


Case Study: Linux
Memory Management
Memory management under Linux has two components.
 The first deals with allocating and freeing physical
memory—pages, groups of pages, and small blocks of
RAM.
 The second handles virtual memory, which is memory-
mapped into the address space of running processes.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
Management of Physical Memory
 Due to specific hardware constraints, Linux separates physical memory
into four different zones, or regions:
 ZONE DMA - the Intel x86-32 architecture, certain ISA (industry standard
architecture) devices can only access the lower 16-MB of physical memory
using DMA. On these systems, the first 16-MB of physical memory comprise
ZONE DMA.
 ZONE DMA32 - Other systems, certain devices can only access the first 4-
GB of physical memory, despite supporting 64-
bitaddresses.Onsuchsystems,thefirst4 GB of physical memory comprise
ZONE DMA32.
 ZONE NORMAL - comprises everything else—the normal, regularly mapped
pages. Whether an architecture has a given zone depends on its constraints.
A modern, 64-bit architecture such as Intel x86-64 has a small 16-MB ZONE
DMA (for legacy devices) and all the rest of its memory in ZONE NORMAL,
with no “high memory”.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
 ZONE HIGHMEM - ZONE HIGHMEM (for “high memory”) refers to
physical memory that is not mapped into the kernel address space. For
example, on the 32-bit Intel architecture (where 232 provides a 4-GB
address space), the kernel is mapped into the first 896 MB of the
address space; the remaining memory is referred to as high memory
and is allocated fromZONE HIGHMEM.
 These zones are architecture specific.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
 The primary physical-memory manager in the Linux kernel is
the page allocator. Each zone has its own allocator, which
is responsible for allocating and freeing all physical pages
for the zone and is capable of allocating ranges of physically
contiguous pages on request. The allocator uses a buddy
system to keep track of available physical pages.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
 Another strategy adopted by Linux for allocating kernel
memory is known as slab allocation. A slab is used for
allocating memory for kernel data structures and is made up of
one or more physically contiguous pages. A cache consists of
one or more slabs. There is a single cache for each unique
kernel data structure.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
 In Linux, a slab may be in one of three possible states:
1. Full. All objects in the slab are marked as used.
2. Empty. All objects in the slab are marked as free.
3. Partial. The slab consists of both used and free
objects.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
Virtual Memory
 The Linux virtual memory system is responsible for maintaining the
address space accessible to each process. It creates pages of
virtual memory on demand and manages loading those pages
from disk and swapping them back out to disk as required.
 Under Linux, the virtual memory manager maintains two separate
views of a process’s address space:
 As a set of separate regions
 As a set of pages.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
 Task of virtual memory
 Virtual Memory Regions
 Lifetime of a Virtual Address Space
 Swapping and Paging
 Kernel Virtual Memory
 Execution and Loading of User Programs
 Mapping of Programs into Memory
 Static and Dynamic Linking

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
File Systems
 Linux retains UNIX’s standard file-system model. In UNIX, a
file does not have to be an object stored on disk or fetched
over a network from a remote file server. Rather, UNIX files
can be anything capable of handling the input or output of a
stream of data. Device drivers can appear as files, and inter
process communication channels or network connections
also look like files to the user.
 The Linux kernel handles all these types of files by hiding
the implementation details of any single file type behind a
layer of software, the virtual file system (VFS).

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
 The Virtual File System The Linux VFS is designed around
object-oriented principles. It has two components:
a set of definitions that specify what file-system objects
are allowed to look like
a layer of software to manipulate the objects.
 The VFS defines four main object types:
 An inode object represents an individual file.
A fil object represents an open file.
A superblock object represents an entire file system.
A dentry object represents an individual directory entry.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
The Linux ext3 File System
 The standard on-disk file system used by Linux is called ext3, for
historical reasons. Linux was originally programmed with a Minix-
compatible file system, to ease exchanging data with the Minix
development system, but that file system was severely restricted by
14-character file-name limits and a maximum file-system size of 64-
MB. The Minix file system was superseded by a new file system,
which was christened the extended file system (extfs).
 A later redesign to improve performance and scalability and to add a few
missing features led to the second extended file system (ext2).
 Further development added journaling capabilities, and the system was
renamed the third extended file system (ext3).
 Linux kernel developers then augmented ext3 with modern file-system
features such as extents. This new file system is called the fourth
extended file system (ext4).

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
The Linux ext3 File System
 Linux’s ext3 has much in common with the BSD Fast
File System (FFS). It uses a similar mechanism for
locating the data blocks belonging to a specific file,
storing data-block pointers in indirect blocks throughout
the file system with up to three levels of indirection.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
Journaling
 The ext3 file system supports a popular feature called
journaling, whereby modifications to the file system are
written sequentially to a journal. A set of operations that
performs a specific task is a transaction.
 If the system crashes, some transactions may remain in the
journal. Those transactions were never completed to the file
system even though they were
committedbytheoperatingsystem,sotheymustbecompletedon
cethesystem recovers.

IT 311: Applied Operating System


Case Study: Linux
Memory Management cont…
The Linux Proc File System
 The Linux /proc file system is an example of a file
system whose contents are not actually stored
anywhere but are computed on demand according to
user file I/O requests.
 A /proc file system is not unique to Linux. UNIX v8
introduced a /proc file system and its use has been
adopted and expanded into many other operating
systems. It is an efficient interface to the kernel’s
process namespace and helps with debugging.

IT 311: Applied Operating System


Case Study: Linux
Input and Output
The I/O system in Linux looks much like that in any UNIX
system. That is, to the extent possible, all device drivers appear
as normal files. Users can open an access channel to a device
in the same way they open any other file—devices can appear
as objects within the file system. The system administrator can
create special files within a file system that contain references
to a specific device driver, and a user opening such a file will be
able to read from and write to the device referenced.
Linux splitsall devicesinto three classes:
 Block devices
 Character devices,
 Network devices.

IT 311: Applied Operating System


Case Study: Linux
Input and Output cont…
 Block devices include all devices that allow random access to
completely independent, fixed-sized blocks of data, including hard
disks and floppy disks, CD-ROMs and Blu-ray discs, and flash
memory. Block devices are typically used to store file systems, but
direct access to a block device is also allowed so that programs
can create and repair the file system that the device contains.
Applications can also access these block devices directly if they
wish. For example, a database application may prefer to perform
its own fine-tuned layout of data onto a disk rather than using the
general-purpose file system.

IT 311: Applied Operating System


Case Study: Linux
Input and Output cont…
 Character devices include most other devices, such as mice and
keyboards. The fundamental difference between block and
character devices is random access—block devices are accessed
randomly, while character devices are accessed serially. For
example, seeking to a certain position in a file might be supported
for a DVD but makes no sense for a pointing device such as a
mouse.
 Network devices are dealt with differently from block and
character devices. Users cannot directly transfer data to network
devices. Instead, they must communicate indirectly by opening a
connection to the kernel’s networking subsystem. We discuss the
interface to network devices separately in.

IT 311: Applied Operating System


Case Study: Linux
Interprocess Communication
Linux provides a rich environment for processes to communicate
with each other. Communication may be just a matter of letting
another process know that some event has occurred, or it may
involve transferring data from one process to another.
 Synchronization and Signals The standard Linux mechanism for
informing a process that an event has occurred is the signal.
Signals can be sent from any process to any other process, with
restrictions on signals sent to processes owned by another user.
 Passing of Data among Processes Linux offers several
mechanisms for passing data among processes. The standard
UNIX pipe mechanism allows a child process to in herit a
communication channel from its parent; data written to one end of
the pipe can be read at the other.

IT 311: Applied Operating System


Case Study: Linux
Network Structure
Networking is a key area of functionality for Linux. Not only does
Linux support the standard Internet protocols used for most UNIX-
to-UNIX communications, but it also implements a number of
protocols native to other, non-UNIX operating systems.
Networking in the Linux kernel is implemented by three layers of
software:
1. The socket interface
2. Protocol drivers
3. Network-device driver
 the IP software passes packets to a separate section of code for
firewall management—selective filtering of packets according to
arbitrary criteria, usually for security purposes.

IT 311: Applied Operating System


Case Study: Linux
Security
Linux’s security model is closely related to typical UNIX security
mechanisms. The security concerns can be classified in two
groups:
1. Authentication. Making sure that nobody can access the
system without first proving that she has entry rights
2. Access control. Providing a mechanism for checking
whether a user has the right to access a certain object and
preventing access to objects as required

IT 311: Applied Operating System

You might also like