O LEVEL- IT TOOLS & BUSINESS SYSTEM

TRICKS TO CRACK FIRST PAPER:   

                            M1-R4: IT TOOLS & BUSINESS SYSTEMS

     

        SOME IMPORTANT TOPICS WHICH FREQUENTLY ASKED EVERY            YEAR:--


OPERATING SYSTEM---
An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers.
Some popular Operating Systems include Linux, Windows, OS X, VMS, OS/400, AIX, etc.
Definition
An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs.



Following are some of important functions of an operating System.
  • Memory Management
  • Processor Management
  • Device Management
  • File Management
  • Security
  • Control over system performance
  • Job accounting
  • Error detecting aids
  • Coordination between other software and users
Memory Management
Memory management refers to management of Primary Memory or Main Memory. Main memory is a large array of words or bytes where each word or byte has its own address.
Main memory provides a fast storage that can be accessed directly by the CPU. For a program to be executed, it must in the main memory. An Operating System does the following activities for memory management −
·        Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in use.
·        In multiprogramming, the OS decides which process will get memory when and how much.
·        Allocates the memory when a process requests it to do so.
·        De-allocates the memory when a process no longer needs it or has been terminated.



Processor Management
In multiprogramming environment, the OS decides which process gets the processor when and for how much time. This function is called process scheduling. An Operating System does the following activities for processor management −
·        Keeps tracks of processor and status of process. The program responsible for this task is known as traffic controller.
·        Allocates the processor (CPU) to a process.
·        De-allocates processor when a process is no longer required.

Device Management
An Operating System manages device communication via their respective drivers. It does the following activities for device management −
·        Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.
·        Decides which process gets the device when and for how much time.
·        Allocates the device in the efficient way.
·        De-allocates devices.

File Management
A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions.
An Operating System does the following activities for file management −
·        Keeps track of information, location, uses, status etc. The collective facilities are often known as file system.
·        Decides who gets the resources.
·        Allocates the resources.
·        De-allocates the resources.
Other Important Activities
Following are some of the important activities that an Operating System performs −
·        Security − By means of password and similar other techniques, it prevents unauthorized access to programs and data.
·        Control over system performance − Recording delays between request for a service and response from the system.
·        Job accounting − Keeping track of time and resources used by various jobs and users.
·        Error detecting aids − Production of dumps, traces, error messages, and other debugging and error detecting aids.
·        Coordination between other softwares and users − Coordination and assignment of compilers, interpreters, assemblers and other software to the various users of the computer systems.
LINUX ----
Linux is one of popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. Its functionality list is quite similar to that of UNIX.
Components of Linux System
Linux Operating System has primarily three components
·        Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs.
·        System Library − System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implement most of the functionalities of the operating system and do not requires kernel module's code access rights.
·        System Utility − System Utility programs are responsible to do specialized, individual level tasks.

Kernel Mode vs User Mode
Kernel component code executes in a special privileged mode called kernel mode with full access to all resources of the computer. This code represents a single process, executes in single address space and do not require any context switch and hence is very efficient and fast. Kernel runs each processes and provides system services to processes, provides protected access to hardware to processes.
Support code which is not required to run in kernel mode is in System Library. User programs and other system programs works in User Mode which has no access to system hardware and kernel code. User programs/ utilities use System libraries to access Kernel functions to get system's low level tasks.
Basic Features
Following are some of the important features of Linux Operating System.
·        Portable − Portability means software can works on different types of hardware in same way. Linux kernel and application programs supports their installation on any kind of hardware platform.
·        Open Source − Linux source code is freely available and it is community based development project. Multiple teams work in collaboration to enhance the capability of Linux operating system and it is continuously evolving.
·        Multi-User − Linux is a multiuser system means multiple users can access system resources like memory/ ram/ application programs at same time.
·        Multiprogramming − Linux is a multiprogramming system means multiple applications can run at same time.
·        Hierarchical File System − Linux provides a standard file structure in which system files/ user files are arranged.
·        Shell − Linux provides a special interpreter program which can be used to execute commands of the operating system. It can be used to do various types of operations, call application programs. etc.
·        Security − Linux provides user security using authentication features like password protection/ controlled access to specific files/ encryption of data.
Architecture
The following illustration shows the architecture of a Linux system −

The architecture of a Linux System consists of the following layers −
·        Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
·        Kernel − It is the core component of Operating System, interacts directly with hardware, provides low level services to upper layer components.
·        Shell − An interface to kernel, hiding complexity of kernel's functions from users. The shell takes commands from the user and executes kernel's functions.
·        Utilities − Utility programs that provide the user most of the functionalities of an operating systems.

FOLLOWING 6 WAY OF LINUX BOOTING PROCESS--
 1. BIOS
§  BIOS stands for Basic Input/Output System
§  Performs some system integrity checks
§  Searches, loads, and executes the boot loader program.
§  It looks for boot loader in floppy, cd-rom, or hard drive. You can press a key (typically F12 of F2, but it depends on your system) during the BIOS startup to change the boot sequence.
§  Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it.
§  So, in simple terms BIOS loads and executes the MBR boot loader.
2. MBR
§  MBR stands for Master Boot Record.
§  It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda
§  MBR is less than 512 bytes in size. This has three components 1) primary boot loader info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes.
§  It contains information about GRUB (or LILO in old systems).
§  So, in simple terms MBR loads and executes the GRUB boot loader.
3. GRUB
§  GRUB stands for Grand Unified Bootloader.
§  If you have multiple kernel images installed on your system, you can choose which one to be executed.
§  GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file.
§  GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem).
§  Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is sample grub.conf of CentOS.
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5PAE)
          root (hd0,0)
          kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/
          initrd /boot/initrd-2.6.18-194.el5PAE.img
§  As you notice from the above info, it contains kernel and initrd image.
§  So, in simple terms GRUB just loads and executes Kernel and initrd images.
4. Kernel
§  Mounts the root file system as specified in the “root=” in grub.conf
§  Kernel executes the /sbin/init program
§  Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.
§  initrd stands for Initial RAM Disk.
§  initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware.
5. Init
§  Looks at the /etc/inittab file to decide the Linux run level.
§  Following are the available run levels
§  0 – halt
§  1 – Single user mode
§  2 – Multiuser, without NFS
§  3 – Full multiuser mode
§  4 – unused
§  5 – X11
§  6 – reboot
§  Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.
§  Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level
§  If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6 means, probably you might not do that.
§  Typically you would set the default run level to either 3 or 5.

6. Runlevel programs
§  When the Linux system is booting up, you might see various services getting started. For example, it might say “starting sendmail …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.
§  Depending on your default init level setting, the system will execute the programs from one of the following directories.
§  Run level 0 – /etc/rc.d/rc0.d/
§  Run level 1 – /etc/rc.d/rc1.d/
§  Run level 2 – /etc/rc.d/rc2.d/
§  Run level 3 – /etc/rc.d/rc3.d/
§  Run level 4 – /etc/rc.d/rc4.d/
§  Run level 5 – /etc/rc.d/rc5.d/
§  Run level 6 – /etc/rc.d/rc6.d/
§  Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/rc0.d.
§  Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K.
§  Programs starts with S are used during startup. S for startup.
§  Programs starts with K are used during shutdown. K for kill.
§  There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed.
§  For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog program will be started before sendmail.
There you have it. That is what happens during the Linux boot process.

If this article is helpful to you then please like share .. thank you..


Comments

Popular posts from this blog

Important Announcements(download all my book free)

O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN

Call by Reference with Pointer in C Language part-4-a