linux slide

Upload: mkumbhcar

Post on 04-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Linux Slide

    1/29

    What is Linux?Linux is, in simplest terms, an operating system. It is the software on a computer that enables

    applications and the computer operator to access the devices on the computer to performdesired functions. The operating system (OS) relays instructions from an application to, forinstance, the computer's processor. The processor performs the instructed task, then sends

    the results back to the application via the operating system.

  • 7/31/2019 Linux Slide

    2/29

    Features of Linux Key features of Linux Operating System:

    Following are the key features of the Linux operatingsystem:

    Multitasking: several programs running at the sametime.

    Multiuser: several users on the same machine at thesame time (and no two-user licenses!).

    Multiplatform: runs on many different CPUs, not just

    Intel. Multiprocessor/multithreading: it has native kernelsupport for multiple independent threads of controlwithin a single process memory space.

  • 7/31/2019 Linux Slide

    3/29

    Advantages OF Linux Linux Advantages Low cost: You dont need to spend time and money to obtain licenses

    since Linux and much of its software come with the GNU General PublicLicense. You can start to work immediately without worrying that yoursoftware may stop working anytime because the free trial version expires.Additionally, there are large repositories from which you can freelydownload high quality software for almost any task you can think of.

    Stability: Linux doesnt need to be rebooted periodically to maintainperformance levels. It doesnt freeze up or slow down over time due tomemory leaks and such. Continuous up-times of hundreds of days (up to ayear or more) are not uncommon.

    Performance: Linux provides persistent high performance on workstationsand on networks. It can handle unusually large numbers of userssimultaneously, and can make old computers sufficiently responsive to beuseful again.

  • 7/31/2019 Linux Slide

    4/29

    Advantages OF Linux Network friendliness: Linux was developed by a group of

    programmers over the Internet and has therefore strongsupport for network functionality; client and server systemscan be easily set up on any computer running Linux. It canperform tasks such as network backups faster and morereliably than alternative systems. Flexibility: Linux can beused for high performance server applications, desktopapplications, and embedded systems. You can save diskspace by only installing the components needed for aparticular use. You can restrict the use of specificcomputers by installing for example only selected officeapplications instead of the whole suite.

    Compatibility: It runs all common Unix software packagesand can process all common file formats.

  • 7/31/2019 Linux Slide

    5/29

    Advantages OF Linux Multitasking: Linux is designed to do many things at the

    same time; e.g., a large printing job in the backgroundwont slow down your other work. Security: Linux is one of the most secure operating systems. Walls and flexible fileaccess permission systems prevent access by unwantedvisitors or viruses. Linux users have to option to select andsafely download software, free of charge, from onlinerepositories containing thousands of high quality packages.No purchase transactions requiring credit card numbers orother sensitive personal information are necessary. OpenSource: If you develop software that requires knowledge ormodification of the operating system code, Linuxs sourcecode is at your fingertips. Most Linux applications are OpenSource as well.

  • 7/31/2019 Linux Slide

    6/29

    Kernal What is Kernel? Explain the task it performs. Answer

    Kernel is used in UNIX like systems and is considered to be the heart of theoperating system. It is responsible for communication between hardware andsoftware components. It is primarily used for managing the systems resources aswell.

    Kernel Activities: The Kernel task manager allows tasks to run concurrently. Managing the computer resources: Kernel allows the other programs to run and

    use the resources. Resources include i/o devices, CPU, memory. Kernel is responsible for Process management. It allows multiple processes to run

    simultaneously allowing user to multitask. Kernel has an access to the systems memory and allows the processes to access

    the memory when required. Processes may also need to access the devices attached to the system. Kernel

    assists the processes in doing so. For the processes to access and make use of these services, system calls are

    used.

  • 7/31/2019 Linux Slide

    7/29

    Basics Architecture of Linux System

  • 7/31/2019 Linux Slide

    8/29

    What Is Difference Between DOS andWindows

    Both Dos and Windows are Operating systems. But, they possess some features which makethem differentiate. These features are listed below:Dos is only single tasking while Windows is multitasking.Dos is based on plain interface while Windows is based on Graphical user interface (GUI).Dos is difficult to learn and understand while Windows is easy to learn and understand.Dos is less preferable by users while Windows is more preferable operating system.

    Limited users can work on dos while in Windows there are many users.We cannot see mouse in Dos while in Windows we can see and use mouse to click on icons orlinks.Simple text commands are written in Dos while in Windows we operate computer with thehelp of mouse.n Dos we cannot Play games, watch movies and listen songs while in Windows we can enjoyplaying games, watching movies and listening songs.n Dos new hardware cannot work properly while in Windows it can detect and installs softwareautomatically.Application and system softwares did not work properly in Dos while in Windows it runs at agreat speed.Dos is not user friendly while Windows operating system is user friendly.Dos performs operations speedily as compared with Windows operating system.

  • 7/31/2019 Linux Slide

    9/29

    LINUX DIRECTORY STURUCTURE

  • 7/31/2019 Linux Slide

    10/29

    10

    1. /bin Contains several useful commands that are of use to both

    the system administrator as well as non-privileged users. Usually contains the shells like bash, csh, etc.... and

    commonly used commands like cp, mv, rm, cat, ls. Also contains programs which boot scripts may depend

    on There are no (real) subdirectories in /bin

  • 7/31/2019 Linux Slide

    11/29

    11

    1. /bin detail

    cat chgrp chmod chown cp date

    dd df dmesg echo false

    Utility to concatenate files to standard output Utility to change file group ownership Utility to change file access permissions Utility to change file owner and group Utility to copy files and directories Utility to print or set the system data and time

    Utility to convert and copy a file Utility to report filesystem disk space usage Utility to print or control the kernel message buffer Utility to display a line of text Utility to do nothing, unsuccessfully

  • 7/31/2019 Linux Slide

    12/29

    12

    7. /lib

    Contains kernel modules and those sharedlibrary images (the C programming codelibrary) needed to boot the system and runthe commands in the root filesystem, ie. bybinaries in /bin and /sbin

    Windows equivalent to a shared library wouldbe a DLL (dynamically linked library) file

  • 7/31/2019 Linux Slide

    13/29

    13

    4. /etc detail

    /etc/hosts : This file is used to define a system name anddomain combination with a specific IP address

    127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 192.168.0.99 debian.localdomain.com debian

    192.168.0.1 ws001

  • 7/31/2019 Linux Slide

    14/29

    14

    5. /home

    The user home directories Accessible only to its owner and the system

    administrator Contains the users personal configuration

    files Quite large to be used as Users Documents

    Space

  • 7/31/2019 Linux Slide

    15/29

    15

    10. /mnt

    This is a generic mount point under mounted

    (mount is to make a filesystem available tothe system) the filesystems or devices. When a filesystem no longer needs to be

    mounted, it can be unmounted with umount mount /dev/hda2 /home umount /dev/hda2

  • 7/31/2019 Linux Slide

    16/29

    16

    File System Implementation

  • 7/31/2019 Linux Slide

    17/29

    File

    Sequence of bytes, with no structure as far asthe operating system is concerned. The onlyoperations are to read and write bytes.

    Interpretation of the data is left to theapplication using it.

    File descriptor a handle to a file that the OSprovides the user so that it can use the file

  • 7/31/2019 Linux Slide

    18/29

    File Metadata

    Owner: the user who owns this file. Permissions: who is allowed to access this file.

    Modification time: when this file was lastmodified. Size: how many bytes of data are there.

    Data location: where on the disk the files datais stored.

  • 7/31/2019 Linux Slide

    19/29

    Hardware background: Direct MemoryAccess

    When a process needs a block from the disk, thecpu needs to copy the requested block from thedisk to the main memory.

    This is a waste of cpu time. If we could exempt the cpu from this job, it will

    be available to run other ready processes. This is the reason that the operating system uses

    the DMA feature of the disk controller. Disk access is always in full blocks .

  • 7/31/2019 Linux Slide

    20/29

    Direct Memory Access Cont.

    OS passes the needed parameters to the disk controller(address on disk, address on main memory, amount of data to copy)

    The running process is transferred to the blockedqueue and a new process from the ready queue isselected to run.

    The controller transfers the requested data from thedisk to the main memory using DMA.

    The controller sends an interrupt to the cpu, indicatingthe IO operation has been finished.

    The waiting process is transferred to the ready queue.

  • 7/31/2019 Linux Slide

    21/29

    Disk Layout

    Boot Block for loading the OS (optional) Swap area (optional)

    Super Block File system management i-nodes File metadata Data blocks Actual file data

  • 7/31/2019 Linux Slide

    22/29

    Super Block

    Manages the allocation of blockson the file system area

    This block contains: The size of the file system A list of free blocks available on the fs A list of free i-nodes in the fs

    And more... Using this information it is possible to allocate

    disk block for saving file data or file metadata

  • 7/31/2019 Linux Slide

    23/29

    Mapping File Blocks It is inefficient to save each file as a consecutive

    data block. Why?

    How do we find the blocks that togetherconstitute the file?

    How do we find the right block if we want to accessthe file at a particular offset?

    How do we make sure not to spend too much space

    on management data? We need an efficient way to save files of varying

    sizes.

  • 7/31/2019 Linux Slide

    24/29

    Typical Distribution of File Sizes

    Many very small files that use little disk space Some intermediate files

    Very few large files that use a large part of thedisk space

  • 7/31/2019 Linux Slide

    25/29

    The Unix i-node In Unix, files are represented internally by a structure

    known as an inode, which includes an index of diskblocks.

    The index is arranged in a hierarchical manner: Few direct pointers, which list the first blocks of the file

    (Good for small files) One single indirect pointer - points to a whole block of

    additional direct pointers (Good for intermediate files)

    One double indirect pointer - points to a block of indirect pointers. (Good for large files) One triple indirect pointer - points to a block of double

    indirect pointers. (Good for very large files)

  • 7/31/2019 Linux Slide

    26/29

    i-node Structure

  • 7/31/2019 Linux Slide

    27/29

    system administrator is responsible

    The system administrator is responsible for following things: User administration (setup and maintaining account) Maintaining system Verify that peripherals are working properly Quickly arrange repair for hardware in occasion of hardware failure Monitor system performance Create file systems Install software Create a backup and recover policy Monitor network communication

    Update system as soon as new version of OS and application softwarecomes out Implement the policies for the use of the computer system and network Setup security policies for users. A sysadmin must have a strong grasp of

    computer security (e.g. firewalls and intrusion detection systems).

  • 7/31/2019 Linux Slide

    28/29

    Linux Installation requirement

    Requirement MinimumRecommended

    Version Linux 2.2 and 2.4 with glibc2.1 or greater

    CPU 400 MHz 800+ MHz

    RAM 32 MB (fileto fileencoding)96 MB (livebroadcasting)

    256 MB

  • 7/31/2019 Linux Slide

    29/29

    System Startup and Shutdown The Boot Process The Initialization Process and Startup Scripts

    linuxconf and Managing Your Services Shutting Down the Linux System When the System Crashes This chapter explains how to start your Red Hat Linux

    system, what happens when it starts, and how toproperly shut it down. It also covers system crashesand what to do if your system won't boot.