Full Download Practical System Programming with C: Pragmatic Example Applications in Linux and Unix-Based Operating Systems 1st Edition Sri Manikanta Palakollu PDF DOCX
Full Download Practical System Programming with C: Pragmatic Example Applications in Linux and Unix-Based Operating Systems 1st Edition Sri Manikanta Palakollu PDF DOCX
com
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/practical-system-programming-
with-c-1st-edition-sri-manikanta-palakollu-palakollu-sri-manikanta/
textboxfull.com
https://textbookfull.com/product/unix-and-linux-system-administration-
handbook-5th-edition-evi-nemeth/
textboxfull.com
https://textbookfull.com/product/shell-programming-in-unix-linux-and-
os-x-stephen-g-kochan/
textboxfull.com
Operating Systems Foundations with Linux on the Raspberry
Pi Wim Vanderbauwhede
https://textbookfull.com/product/operating-systems-foundations-with-
linux-on-the-raspberry-pi-wim-vanderbauwhede/
textboxfull.com
https://textbookfull.com/product/wicked-cool-shell-
scripts-101-scripts-for-linux-os-x-and-unix-systems-dave-taylor/
textboxfull.com
https://textbookfull.com/product/practical-numerical-c-programming-
finance-engineering-and-physics-applications-philip-joyce/
textboxfull.com
https://textbookfull.com/product/operating-system-forensics-1st-
edition-messier/
textboxfull.com
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
Hardware Layer
This layer consists of drivers that are required to handle peripheral
devices like the mouse, keyboards, hard disks, SSD, printers, and so
forth.
Kernel
The kernel is the heart of the operating system; without kernels, you
are not able to communicate with application programs and the
operating system on hardware devices. The kernel acts as an interface
between hardware components and application programs. A kernel has
the following functionalities.
I/O management
Process management
Resource management
Device management
I/O Management
A kernel has several I/O management advantages that make a system
more intelligent.
It provides I/O scheduling with standard scheduling algorithms.
It effectively buffers the data transfer between two devices.
It caches data, which improves the performance of the system.
It handles errors and issues when a user performs an illegal
operation.
Process Management
On an operating system, process management is important in
performing a certain task or activity requested by the user; for example,
executing a program, playing music, or editing a video or photo using a
software application. These activities are represented by tasks that
need to be executed by the CPU with the help of the processor. The
kernel properly manages the threads without any conflicts.
Resource Management
When a task is performed in an operating system, it requires system
resources. The CPU allocates the required resources to perform the
task. The kernel optimizes the resources during process
synchronization.
Device Management
A peripheral device requires a specific driver to connect to the
operating system. The kernel maintains the device drivers so that they
properly connect when needed.
Types of Kernels
There are five types of kernels. Each type has advantages and
disadvantages.
Monolithic kernel
Microkernel
Hybrid kernel
Nanokernel
Exokernel
Monolithic Kernels
In a monolithic kernel , the memory space between the user and the
kernel services is not shared. The advantage of this kernel is that
memory management, CPU scheduling, and file management is done
through system calls only. A monolithic kernel works faster because it
acts under a single memory space. The disadvantage is that creating
new services is a difficult task.
Microkernels
Before discussing microkernels, let’s talk about kernel space and user
space.
Kernel Space
The space that is allocated to run the core part of an operating system is
called kernel space . This space has access to the system hardware and
provides all the core functionalities to the system applications. A user
can access this space only with the help of system calls. Kernel space
contains the kernel code, which are data structures that are identical to
all the processes that are running on the system. In kernel space,
memory is directly mapped to the physical memory.
User Space
The space that is allocated to the running applications is called user
space . User space consists of data, process data, and memory-mapped
files. In user space, memory mapping differs from one address space to
another address space. The kernel supervises the activities that a
process needs to perform on the user space.
A kernel which has a different memory space for user services and
kernel services is called a microkernel . In microkernels, users use the
user space while the kernel uses the kernel space to perform system
activities. The advantage of a microkernel is that a new service is easily
created. The disadvantage is that it increases the execution time of the
activity due to different address spaces.
Figure 1-3 Microkernel architecture
Hybrid Kernels
A hybrid kernel is the combination of a monolithic kernel and a
microkernel to improve the performance of the operating system. It
takes the advantages of both kernels to improve the performance of the
operating system.
Nanokernels
A nanokernel works on a nanosecond clock resolution. It is a very small
and minimalistic kernel that performs an activity. It provides good
hardware abstraction, but there is a lack of system services. The
functionality of the kernel does not depend on IPC (interprocess
communication).
Exokernels
An exokernel provides direct application-level management of the
hardware resources. This kernel has limited functionality because of its
small size. It allows you to perform application-level customization
very easily. It is very interactive and efficient, but the disadvantage is its
complex architecture and design.
Figure 1-4 Exokernel architecture
Shell
A shell is a software program that executes other commands in a Unix-
based operating system. The task of the shell is that it takes input from
the user and performs the action based on the given input. By default,
all Unix/Linux-based operating systems contain a bash shell. This shell
hides the complexity of the kernel functionality from the users.
System Library
The system library contains special functions that effectively access the
kernel’s features. It contains all the utilities and applications that are
available in a common operating system.
Introduction to Files
Files are commonly used to store data. The data in a file determines the
file type. In general, there are five types of files available on any
operating system.
Text files
Program files
Binary files
Special files
General files
A file type is revealed by its extension. An image is a file that
contains the most common extensions (.png, .jpg, .jpeg, .tiff, .gif, etc.).
Files are maintained and managed by the file system, which is a
hierarchical structure that stores the content in a structured format.
These file structures are discussed in upcoming chapters. For now, let’s
discuss each file type.
Text File
A text file contains data that the reader can easily read. These files are
created by the user or system-generated log files. There are many types
of text files. Log files usually have the .log extension. The README.md
file is a normal text file that uses markup language.
Program File
A program file contains a set of instructions written by the software
developer to produce the software or application. There is no common
extension for program files because there are multiple programming
languages. The program file extension is based on the programming
language in which the file content is written. The rules and syntax differ
by programming language. The most common extensions are .c, .cpp,
.java, .sh, and .bat. These program files become executable based on the
requirements and usage. You can use any type of extension to perform
the same task, but it is recommended to use the standard extension
given by the ISO.
Binary File
A binary file contains information that is a combination of 0s and 1s.
The information in a binary file is not human-readable or
understandable. It is only understood by computers. Binary files are
generally executable files. These files are generated by compiling a
program file. You can convert a program file into an executable file; for
example, when you compile a C program, it will generate an executable
file.
Special File
A special file is implicitly created by a system process, or it is explicitly
created by a programmer for a specific purpose. Examples of a special
file include pipes and message queue files. Special files are explained in
upcoming chapters.
Another Random Scribd Document
with Unrelated Content
CHAPTER XVIII.
Fig Fig
1. 2.
CHAPTER XIX.
Fig Fig Fig Fig Fig Fig Fig Fig Fig Fig
1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
CHAPTER XX.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com