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

Module I - Introduction To Linux

Uploaded by

Shubham
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Module I - Introduction To Linux

Uploaded by

Shubham
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

MODULE I

LINUX BASICS

by: Dr. Ram Paul Hathwal


Dept of CSE, ASET, AUUP
Linux for Devices Department of Computer
Science and Engineering
CSE438

Dr. Ram Paul Hathwal


Department of Computer Science and Engineering
Amity University Uttar Pradesh
Department of Computer
Syllabus Science and Engineering

 Syllabus_Linux for Devices_CSE438.docx

Course Goals
 Introduce you to the basics of Linux.
 Explores the basic characteristics of Linux Networking.
 Teach you to learn Linux Shell, File Structure, and Network
Administration Services.
 Makes you understand various Linux security techniques.
Learning Objective Department of Computer
Science and Engineering

 To understand how Linux was developed and which are the features that make it
popular as compared to other operating systems
 To give an abstract description of the overall architecture of Linux
 To present various designs of the kernel and among them which design is adopted
for Linux kernel development
 To present the design and importance of each directory/file in the Linux file system
 To present the idea of how a communicator takes responsibility to send only correct
instructions to the master component of O/S so that the master can do more
productive work
 To impart the most useful Linux commands
 Understand the basics of Linux
 Application of Linux in Industry Usage
Learning Objective
Department of Computer
Science and Engineering

 Can understand the popularity of Linux and its various distributions that can be used
for personal and commercial purposes without any cost
 Understand the essential components of Linux system architecture
 Able to distinguish the design of Linux kernel with non-Linux O/S kernel
 Able to understand the importance of file system
 Able to understand that to increase the throughput of the system, the correctness of
the user instruction must be checked by the mediator before execution
 Comfortable to use commands in any organization where Linux o/s is primarily used.
 Analyze the category of different types of users.
 Able to assign appropriate access permission to users working in the same system.
 Perform the basic operations for Linux.
 Analyze the potential of Linux in Industry.
Topics Department of Computer
Science and Engineering

 Introduction to Linux
 File System of the Linux
 General usage of Linux kernel & basic commands
 Linux users and group
 Permissions for file
 Directory and users
 Searching a file & directory
 Zipping and Unzipping concepts
 Linux for the Industry 4.0 Era
 OPENIL and its advantages
 Features of OPENIL
Why Linux Department of Computer
Science and Engineering

 A Linux Distribution has thousands of dollars worth of


software for no cost.
 Linux is a complete operating system:
 Stable - the crash of an application is much less likely to bring down
the OS under Linux.
 Reliable - Linux servers are often up for hundreds of days compared
with the regular reboots required with a Windows system.
 Extremely powerful
Why Linux (continued) Department of Computer
Science and Engineering

 Excellent networking facilities.


 Ideal environment to run servers such as a web server, or an ftp server
 A wide variety of commercial software is available if not satisfied by the free software
 Easily upgradeable.
 Supports multiple processors.
 True multi-tasking, multi-user OS.
 An excellent window system called X, the equivalent of Windows but much more
flexible.
Department of Computer
Before Linux Science and Engineering

 In 80’s, Microsoft’s DOS was the dominant OS for PC


• single-user, single-process system
 Apple MAC is better, but expensive
 UNIX is much better but much more expensive.
 Only for minicomputers for commercial applications
 People were looking for a UNIX-based system, which is cheaper and
can run on a PC
 Both DOS, MAC, and UNIX are proprietary, i.e., the source code of
their kernel is protected.
• No modification is possible without paying high license fees
Department of Computer
GNU Project Science and Engineering

 Established in 1984 by Richard Stallman, who believes that software


should be free from restrictions against copying or modification to
make better and more efficient computer programs
 GNU is a recursive acronym for “GNU's Not Unix”
 Aim at developing a complete Unix-like operating system which is free
for copying and modification.
 Companies make their money by maintaining and distributing the
software, e.g. optimally packaging the software with different tools
(Redhat, Slackware, Mandrake, SuSE, etc)
 Stallman built the first free GNU C Compiler in 1991.
 But still, an OS was yet to be developed
Beginning of Linux Department of Computer
Science and Engineering

 A famous professor Andrew Tanenbaum developed Minix, a simplified


version of UNIX that runs on PC
 Minix is for class teaching only. No intention for commercial use
 In Sept 1991, Linus Torvalds, a second-year student of Computer Science
at the University of Helsinki, developed the preliminary kernel of Linux,
known as Linux version 0.0.1
 It was put to the Internet and received enormous response from
worldwide software developers
 By December came version 0.10. Still Linux
was little more than in skeletal form.
Confrontation and Department of Computer

Development Science and Engineering

 Message from Professor Andrew Tanenbaum


 " I still maintain the point that designing a monolithic kernel in 1991 is a fundamental
error. Be thankful you are not my student. You would not get a high grade for such a
design :-)" (Andrew Tanenbaum to Linus Torvalds)
 "Linux is obsolete".
 (Remark made by Andrew Tanenbaum)
 But work went on. Soon more than a hundred people joined the Linux
camp. Then thousands. Then hundreds of thousands
 It was licensed under GNU General Public License, thus ensuring that the
source codes will be free for all to copy, study and to change.
Linux Department of Computer
Science and Engineering

 Created by Linus Torvalds in 1991


 Includes system utilities & libraries from the GNU Project
 Open Source Hardware:
 Free
 Stable
 Easily fixed if bugs appear

 Why did Linux become popular??


 Low-cost alternative in sagging economy
 Fear of Microsoft gaining a stranglehold on corporate
 Intel loosened its relationship with Microsoft
 IBM made an effort to be Linux-compatible
Linux Today Department of Computer
Science and Engineering

 Linux has been used for many computing platforms


 PC, PDA, Supercomputer,…
 Current kernel version 2.6.13
 Not only character user interface but graphical user interface,
thanks to the X-Window technology
 Commercial vendors moved in Linux itself to provide freely
distributed code. They make their money by compiling up
various software and gathering them in a distributable format
 Red Hat, Slackware, etc.
 Chinese distribution of Linux also appeared in Taiwan and
China - CLE, Red Flag Linux
Department of Computer
Science and Engineering

Linux Has Many Distributions


Linux Pros and Cons
Department of Computer
Science and Engineering

 Advantages over Windows


 It's almost free to relatively inexpensive
 Source code is included
 Bugs are fixed quickly and help is readily available through the vast
support in the Internet
 Linux is more stable than Windows
 Linux is truly multi-user and multi-tasking
 multiuser: OS that can simultaneously serve a number of users
 multitasking: OS that can simultaneously execute a number of
programs
 Linux runs on equipment that other operating systems consider too
underpowered, e.g. 386 systems, PDA, etc.
Department of Computer
Linux Pros and Cons Science and Engineering

 Advantages over Windows


 Isn't as popular as Windows
 No one commercial company is responsible for Linux
 Linux is relatively hard to install, learn and use Linux runs on
equipment that other operating systems consider too
underpowered, e.g. 386 systems, PDA, etc.
 Hence currently, Linux is mainly used in commercial applications,
server implementation
 More than 75% current network servers are developed based on
Linux or Unix systems
– Due to the relatively high reliability
Department of Computer
Linux vs. Unix Science and Engineering

 Linux is free, but Unix is not


 Unix is compatible with Linux at the system call level, meaning most
programs written for either Unix or Linux can be recompiled to run
on the other system with a minimum of work
Linux vs. MS Windows Department of Computer
Science and Engineering

 Both offer
 Graphics capabilities
 Networking capabilities
 But Linux networking is excellent
Linux System Architecture Department of Computer
Science and Engineering

• Kernel
• The part of an OS where the real work is done
• System call interface
• Comprise a set of functions (often
known as Application Programmer’s Interface (API) that can be used
by the applications and library routines to use the services provided
by the kernel
• Application User’s Interface  Process Management
• Interface between the kernel and user • For a multitask system, multiple programs can
• Allow user to make commands to the system be executed simultaneously in the system

• When a program starts to execute, it becomes a process
Divided into text-based and graphical-based
• The same program
• File Management executing at two different times will become two different
• Control the creation, and removal of files and processes
provide directory maintenance • Kernel manages processes in terms of creating, suspending,
• For a multiuser system, every user should have its and terminating them
own right to access files and directories • A process is protected from other processes and can communicate
with others
Department of Computer
Linux System Architecture Science and Engineering

 Memory management
• Memory in a computer is divided into main memory (RAM) and secondary storage (usually referred to as hard disk)
• Memory is small in capacity but fast in speed, and hard disk is vice versa
• Data that are not currently used should be saved to a hard disk first, while data that are urgently needed should be retrieved
and stored in RAM
• The mechanism is referred to as memory management
 Device drivers
• Interfaces between the kernel and the BIOS
• Different device has different driver
 Kernel
• A core component of the Operating System without which OS can’t work
• Kernel is the nervous system of the OS
• It controls everything in OS including I/O Management, Process Management and so on
• It is a bridge between applications and the actual data processing done at the hardware level
• It acts as an interface between the user applications and the hardware
Department of Computer
Science and Engineering
Department of Computer
Science and Engineering
Tasks of kernel Department of Computer
Science and Engineering

1. Central Processing Unit


The Kernel takes responsibility for deciding at any time which of the
many running programs should be allocated to the processors

2. Random Access Memory


It is used to store both program instructions and data. Often multiple
programs will want memory access, frequently demanding more
memory than the computer has available. The Kernel is responsible
for deciding which memory each process can use and determining what to
do when not enough memory is available.
Continued… Department of Computer
Science and Engineering

3. Input/Output Devices
The Kernel allocates requests from applications to perform I/O to an
appropriate device and provides convenient methods for using the device
4. Memory Management
The Kernel has full access to the system's memory and must allow processes
to safely access this memory as they require it
5.Device Management
A Kernel must maintain a list of available devices. This list may be known in
advance configured by the user or detected by the operating system at run
time (normally called plug and play)
Continued… Department of Computer
Science and Engineering

 Scheduling of Process (Dispatching)


 Interprocess Communication
 Process Synchronization
 Context Switching
 Manipulation of Process Control Blocks
 Interrupt Handling
 Process Creation and Destruction
 Process Suspension and Resumption
Types of Kernel Department of Computer
Science and Engineering
Monolithic Kernel Department of Computer
Science and Engineering

 Run in Kernel space every basic system service like


• process and memory management,
• interrupt handling and I/O Communication,
• file system etc. in Kernel space
 Used by Unix, Linux like Operating systems
• Since there is less software involved, it is faster
 Every component of the Operating system is contained in the kernel and
can directly communicate with each other simply by using function calls.
 The Kernel typically executes with unrestricted access to the computer
system
 This approach provides rich and powerful hardware access
Monolithic Kernel Department of Computer
Science and Engineering
Pros of Monolithic Kernel Department of Computer
Science and Engineering

 Smaller in source and compiled forms


 Less code generally means fewer bugs and security problems is also
less
 System calls are used to do operations in a monolithic kernel
 Execution is fast

 It has all the things in the kernel itself so we don't need any extra
mechanism for handling of I/O and process at the time of application
making.
Department of Computer
Cons of Monolithic Kernel Science and Engineering

 Coding in kernel space is hard since you cannot use common libraries
 Debugging is harder, rebooting the computer is often needed
 Bugs in one part of the kernel produce strong side effects
 Kernels often become very huge and difficult to maintain
 Not portable one. Monolithic kernels must be rewritten for each new
architecture that the OS is to be used on.
Micro Kernel Department of Computer
Science and Engineering

 The kernel provides basic functionality that allows the execution of


servers and separate programs
 The Kernel is broken into separate processes known as server
• Some of the servers run in user space and some in kernel space
• All servers are kept separate and run in different address spaces
 The communication in microkernels is done via message passing
• The servers communicate through Interprocess
Communication(IPC)
• Servers invoke "services" from each other by sending messages
 It is also possible to dynamically switch among operating systems and
to have more than one active simultaneously
Micro Kernel
Department of Computer
Science and Engineering
Advantages of Micro Kernel Department of Computer
Science and Engineering

 Easier to maintain than Monolithic Kernel


 Crash resistant (If one server fails, other servers can still work
efficiently)
 Portable
 Smaller in size
 Contains smaller amount of code. It increases stability and security.
Department of Computer
Key Comparisons Science and Engineering

Basis for Comparison Micro Kernel Monolithic Kernel

Size Smaller in size Larger than microkernel


Execution Slow Fast
Extendible Easy to extend Hard to extend
Security If a service crashes, it If a service crashes, the
does effects on working whole system crashes in
on the microkernel monolithic kernel

Code To write a microkernel To write a monolithic


more code is required kernel less code is
required
Example QNX, Symbian, L4Linux Linux, BSDs(FreeBSD,
etc. OpenBSD, NetBSD)etc.
Department of Computer
Science and Engineering

Thanks!…
Any question?

You might also like