StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Init Process in Linux - Case Study Example

Cite this document
Summary
This case study "Init Process in Linux" discusses the Init process, a process that runs in the Linux operating system (Goodwin). The report analyzes the report in detail, its running level, and configuration. The Red Hat version of Linux has a unique way of operating…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER96% of users find it useful
Init Process in Linux
Read Text Preview

Extract of sample "Init Process in Linux"

?Init process in Linux By definition, an operating system is a collection of software programs that govern the operation of a computer, where it acts as an interface between the computer and the user. The operating systems are responsible for managing the activities that run in a computer, and sharing the available resources among these activities (Ippolito). There are a number of operating systems, which are categorized on the basis of the applications they support and the type of computers they control. The most common operating systems are Microsoft Windows, Linux, Mac, Solaris and UNIX. In order for the operating system to interact with the computer and the user, there has to be a set of processes running in the background. These processes offer a common language that allows the computer to work together with the installed software and hardware. The following report focuses on the Init process, a process that runs in the Linux operating system (Goodwin). The report analyzes the report in detail, its running level and configuration. Introduction to Linux Developed in 1991 by Linus Torvalds, Linux is an open source operating system developed under the GNU General Public License (Firewall.cx Newsletter). This operating system also goes under the name GNU/Linux as its main supporting user space libraries and system tools originated from the GNU project. Its defining component is the Linux Kernel which has set a platform for the establishment of numerous operating systems released on the basis of this platform. It was initially developed for Intel x86 systems. Since then, it has undergone major transformations and has now been ported to more hardware platforms. Its popularity has also increased over time, and it is now the operating system of choice among servers, mainframe computers and supercomputers (Firewall.cx Newsletter). Commercial applications under the Linux platforms have also experienced immense growth over the past few years. Linux has also made significant contributions to the mobile handset market where it is incorporated into embedded systems. For instance, it is the operating system of choice in some video game consoles, network routers and most importantly, the android system whose use has increased significantly among mobile handset users. Linux Source Code As stated earlier, Linux is developed on the free and open source software platform (About.com). This means that anyone can use, modify and distribute its source code under certain licenses. By definition, source code refers to the programming language statements designed to facilitate the operations of the computer. Linux Init Processes. Linux Init Processes refers to final process in the booting process. It initialises all programs as defined in the file /etc/inittab. The file usually contains several instances of “Getty” which become started by the Init process. The instances of Getty then start the shell processes. Basically, Init has control over numerous independent processes needed by the system. Init gets everything run properly after the kernel has started running fully (Linux.die.net). It creates and runs the user space which involves looking for and installing file systems, starting essential user services and also switching to a user environment after the system start up becomes complete. This step does everything that the system needs done at the system initialisation. At the system initialisation, processes such as setting the clock and initialisation of serial ports become accomplished. Init continues reading from the “/etc/inittab” which describes the set up of the system at each run level. The procedure through which the Init process goes through can be summarised as follows: Reading the “/etc/inittab” initialisation file - Init reads a configuration script which sets up a path, swaps and checks the file systems (Garrels). This step takes care of several things such as setting up the clock and initialisation of serial ports. Init continues reading the “/etc/inittab” file – this step describes the setting up of the system and establishes the default run level. The run level refers to a conformation of processes which will be discussed later on. With the default run level determined, Init begins background processes needed to run the system by searching in the “rc” directory for the run level. Init runs the kill script using a stop parameter (Goodwin). The file name of the script starts with a K. it then runs a start script (whose file names start with an S). These scripts become run in the proper run level directory so that their services and applications can start correctly. The “/etc/inittab” directory then divides a “Getty” process for all the virtual consoles. This refers to a login command usually done in text mode. The “Getty” process then authenticates the user through the login method. The “/etc/inittab” also tells Init about handling a user (Goodwin). It can also instruct Init to monitor the shutting down of the computer by executing the “/sbin/shutdown -t3 -r now” command. The directory also instructs the Init process on what to do during power failures and when the computer has a UPS attached to it (Garrels). Linux Init Run Levels The Linux Init process bears a close resemblance to the UNIX and BSD Init processes since it became derived from them. Init becomes executed within the run level. The run level refers to a system software configuration which allows several processes to be in existence (Firewall.cx Newsletter). The run level takes values from 1 to 6 which determine the subsystems that will be made operational. A single run level has a script which organises the processes which set up or leave the run level. The scripts become stored in directories which have names such as “/etc/rc”. The highest level configurations file for the Init as shown earlier is “etc/inittab”. Of the six run levels, “0” refers to the shutdown whereas “3” and the other run levels above it refer to fully operational processes, which become used for user interaction (Linux.die.net). During the system boot, the “/sbin/init” program starts off other operations through the following operations: Init starts up the machine by commencing programs as stated in the /etc/inittab file. The computer becomes booted to run level as per the directive “initdefault” located in the “/etc/inittab” file. For example id: 5: initdefault: The number 5 in this case refers to the run level 5. This boots the system into the Graphical User Interface mode using X – Windows and XDM. Sometimes the booting can be done to run level 3 (also known as Console Mode) which become used by servers that so not require a Graphical User Interface (Linux.die.net). If the booting becomes done to run level 3, the run level can be promoted using the command “[root prompt] # Init 5”. The inittab file allows a user to capture important runs such as “Ctrl+Alt+Del” and the Start Dial when connecting to the internet (Goodwin). One of the processes initialised by the Init process includes “/sbin/rc” which runs several scripts in different directories. Some of these directories include “/etc/rc.d/rc0.d/”, “/etc/rc.d/rc2.d” and “/etc/rc.d/rc1.d/”. All of the scripts become executed in the directories become implemented for every state of the boot procedure until it becomes fully operational. Scripts, which begin with S, refer to start up whereas those which begin with K refer to shutdown (kill). Numbers become used after the letters in order to show the level of execution. The following list shows the different run levels their script directory and functions. Run Level Function / Operation Run level 0 (Script “/etc/rc.d/rc0.d/”) Shuts down the system Run level 1 (Script “/etc/rc.d/rc1.d/”) Single user mode. Run level 2 (Script “/etc/rc.d/rc1.d/”) Multi user with no network services exported. Run level 3 (Script “/etc/rc.d/rc3.d/”) Default text / Console Mode, which can only start. Full multi user and sometimes can be a server. Run level 4 (Script “/etc/rc.d/rc4.d/”) Always Reserved for local use. Also known as X-windows (Slackware / BSD). Run level 5 (Script “/etc/rc.d/rc5.d/”) XDM X - Windows Graphical User Interface mode (Red Hat / System V) Run level 6 (Script “/etc/rc.d/rc6.d/”) Reboot S or s Single user / Maintenance mode (Slackware) M Multiuser mode (Slackware) Levels can be switched by giving the Init command the correct run level. The method for doing this using the command is as follows: "Init #" whereby the # refers to any of the 6 characters which are s / S, 0, 1, 3, 5, 6 For example for each of the individual run levels, the command would be: Init 0, Init 1, Init 2, Init 3, Init 4, Init 5, Init 6. The command “telinit” can also be used to replace “Init”. The scripts for the run levels run during the booting and shut down processes. The scripts’ directory happens to be “/etc/rc.d/rc#.d/” Whereby the # refers to the run level. For example, the run level 3 runs the script in the directory “/etc/rc.d/rc3.d/”. During system boot, the scripts start with “s” whereas, during shutdown, the script ends with the letter “K”. This mode of doing things gives an organised way of bringing the system to varying conditions for maintenance and production modes (Ippolito). The Linux operating system allows the installation of background processes also known as demons. Additionally, Linux runs all of them which can slow down the computer (How to Wikia). Due to this, the user needs to instal only the necessary ones. They can be started or stopped by using the “/etc/init.d/” Directory and running the service Init scripts found in them. In this case, the focus lies on the Red Hat Version only hence the directory to be used will be “/etc/rc.d/init.d/” or simply “/etc/init.d/” which can be linked to the “/etc/rc.d/init.d/”. The commands give the options to start, stop, reload, restart or even status. For example to stop the web browser, one needs to type in “/etc/init.d/httpd Stop”. The command ps-aux allows the user to view the processes of the machine (About.com). In order to list the state and the run level of services in the Red Hat, the user needs to use the following commands: “Init: chkconfig -- list” – gives the list of the services “Service – status all | grep running” – shows the status of services in operation. “/usr/X11R6/bin/tksysv” – Graphical User Interface tool. Init Configuration File Format The best way to understand a program involves reading the source code or the configuration files. Red Hat Enterprise Linux advantage involves having the source code available for everyone use or modify. The configuration file for GRUB happens to be “/boot/grub/grub.conf”. GRUB usually reads the partitions ext2 and ext3 which then become loaded to the configuration file during boot time. The configuration file creates a list which shows the operating systems that will be booted. The GRUB’s menu interface then gives the user several commands, which need to be executed. The operation behind some of the commands involves the use of words (options) after their names (Red Hat, Inc.). The options should be separated from the word using characters. Some of these commands include: Boot – this process boots the operating system or the last chain loader loaded. Chain loader - the specified file becomes loaded as a chain loader. The location of the file determines the character to be used. If the file’s location happens to be on the first sector of the partition, the block list notation +1 becomes used rather than the file name. The command “chain loader ” can also be used as a file directive. The should be replaced by the chain loader’s absolute path. The command in brackets (chainloader +1 displaymem) shows the use of memory depending on the information acquired from the BIOS. Initrd - gives users the ability to be specific about the RAM disk to be used initially when booting. Initrd becomes necessary when certain modules in the kernel become necessary to boot the computer (Red Hat, Inc). One of these times includes when the ext3 file system becomes used formatting the root partition. - shows a partition, file and device on which the first image of the boot loader can be found. For example, (hd0,0)/grub/stage1. - shows the location of the installation of the first stage of the boot loader. - passes the second stage of the boot loader to the first stage. For example, (hd0,0)/grub/stage2. p - instructs the install command to search for the configuration file on the menu specified as . For example, (hd0,0)/grub/grub.conf. The install command overwrites all the information on the MBR. As mentioned earlier, the interface configuration file for the GRUB menu happens to be “/boot/grub/grub.conf”. The commands which set the global preferences for the menu become placed on the file’s top. This then become followed by stanzas for the operating kernels or system software found on the menu’s list. Kernel - shows the file in the kernel which will be loaded when the operating system boots. should be replaced by an absolute path from the root command specified partition. For example, should be replaced by options in the Linux kernel like “root=/dev/VolGroup00/LogVol00” which specifies the location of the device on the root partition of the system. Other commands can be used in the GRUB menu configuration file such as: Color - defines the colors to be used in the menu. The colors can be specified as the background and foreground. Here, the colors can be specified by simply using their names (He). An example of doing this is: Color red/black green/blue default= - the integer should be replaced with the title of the default entry number which will be loaded when and if the menu interface times out. Fallback= - the integer should be replaced by the entry title number in case the first attempt fails. Hiddenmenu – this prevents the displaying of the GRUB menu interface. It loads the default entry during the expiration of the time out. The GRUB menu can be seen after pressing the Esc menu. Initrd - a user can specify the initial RAM disk that will be used when booting. The absolute path to the original RAM disk should replace . Conclusion In conclusion, the Red Hat Version of Linux has a unique way of operating. This mode of operation allows different modes of the operating system to be used. These modes become specified by the run levels. The file in the directory “/etc/inittab” holds a key role in the operations of the operating system. The different versions of the operating systems have different capabilities and disadvantages in their own right. This arises from the specialisation of the mode of the operating system. For example, the run level 3 allows the user to the operator to run a multi user system, whereas it lacks the capabilities of the graphical user interface. This shows that the specialisation if the different modes serves to minimise on possible weaknesses hence strengthening the targeted strengths. The configuration file has many aspects to it which can be controlled by the commands illustrated above. The key to understanding the operations of Red Hat version of Linux revolves around mastering the commands used in the Configuration file and specifications of the different run levels. Additionally, the files in the different directives should be well noted. Works Cited About.com. Linux Command Init. n.d. 30 4 2013 . Firewall.cx Newsletter. Understanding The Linux Init Process & Different RunLevels. 2000- 2013. 30 4 2013 . Garrels, Machtelt. Boot process, Init and shutdown. 2008. 30 4 2013 . Goodwin, Steven. Initialization sequence in GNU/Linux. 21 10 2005. 30 4 2013 . How to Wikia. Guide to Linux boot sequence. n.d. 30 4 2013 . Ippolito, Greg. YoLinux.com: Linux Init Process / PC Boot Procedure. 2001-2012. 30 4 2013 . Linux.die.net. init(5) - Linux man page. n.d. 30 4 2013 . Red Hat, Inc. Red Hat Enterprise Linux 6 Cluster Administration. Red Hat, Inc, 2013. Red Hat, Inc. Red Hat Enterprise Linux 4. Raleigh, NC 27606-2072: Red Hat, 2008, 2011. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Linux Init Processes Essay Example | Topics and Well Written Essays - 2500 words”, n.d.)
Linux Init Processes Essay Example | Topics and Well Written Essays - 2500 words. Retrieved from https://studentshare.org/information-technology/1475762-linux-init-processes
(Linux Init Processes Essay Example | Topics and Well Written Essays - 2500 Words)
Linux Init Processes Essay Example | Topics and Well Written Essays - 2500 Words. https://studentshare.org/information-technology/1475762-linux-init-processes.
“Linux Init Processes Essay Example | Topics and Well Written Essays - 2500 Words”, n.d. https://studentshare.org/information-technology/1475762-linux-init-processes.
  • Cited: 0 times

CHECK THESE SAMPLES OF Init Process in Linux

Linux vs UNIX as Operating Systems

The following shells are available for Linux:Shell Name Developed by WhereRemark BASH ( Bourne-Again SHell )Brian Fox and Chet RameyFree Software FoundationMost common shell in linux.... (Pike et al) Bell Labs As UNIX worked toward being a reputable file system and operating system, but, as this type of file system and operating system becomes redundant another more powerful user friendly operating system called linux. … Many of the new operating systems tend to implement two classes of processes....
7 Pages (1750 words) Essay

Linux Enterprise Study

linux was first developed by Linus Torvalds in 1991.... linux is a UNIX-like operating system that is available in the form of open source with commitments from a number of application developers and the two large technology giants - RED HAT (http://www.... om/linux/).... They have more than 600 developers dedicated to developing solutions on linux platform (http://www-03.... om/linux/).... This paper presents a detailed understanding of linux Enterprise System, its capabilities in a Networked environment and its application in the global IT market....
10 Pages (2500 words) Essay

Process Control Block

linux uses the structure task_struct to describe the characteristics of a process.... process control block (PCB) is an integral data structure because each PCB contains the processing information required by the operating system.... Simply put, it is where the operating system stores all pertinent information in a specific process.... Since the fundamental task of any OS is the management of processes, PCBs are accessed and amended by every module in the operating system - these are the elements that are in control of allocation of resources, synchronization, memory management, scheduling, system monitoring and interruption processing (Stallings, 2004). … A process is an executed program....
4 Pages (1000 words) Essay

Systems Programming

hellip; This paper sets out to compare and contrast the Kernels of the Microsoft Windows 8 (the latest version now in current use - future versions still being under analysis and development by Microsoft), the Apple Macintosh OS X operating system [latest version], the FreeBSD operating system [latest version] and linux [latest version]....
11 Pages (2750 words) Essay

Comparison of Operating System Kernels

These come in form of products from Microsoft, Apple, linux, FreeBSD and many more.... For example a particular process, and a particular program may be designed to execute a certain function, the kernel is a larger entity that is created to enable execution of the entire operating system....
11 Pages (2750 words) Essay

Basic Principles of Computer Networks and TCP/IP Protocols

The linux operating systems work in a similar way as the OS X and Windows (Knuth, 2003, p.... The CPU acts as the thinking process or the computer brains just like humans have their brains to process and relay information.... This report "Basic Principles of Computer Networks and TCP/IP Protocols" presents computer communication that works through the protocol suits....
6 Pages (1500 words) Report

Windows XP Vs Linux Ubuntu

This paper "Windows XP Vs linux Ubuntu" will undertake the exercise of comparing the memory management of two operating systems, namely, windows XP and Ubuntu linux.... Windows is a closed source desktop operating system, while linux is an open-source version of UNIX file system and is used as a powerful, low-cost operating system for running servers.... Ubuntu is a computer operating system based on linux.... Windows XP and linux have modern MM systems, and surprisingly both have a lot in common....
9 Pages (2250 words) Case Study

Understanding Linux Network Internals

This case study "Understanding linux Network Internals" discusses linux operating systems that are particularly popular for servers because they take advantage of a huge open-source software community.... linux is a system that is popular as a server operating system in the business, and government.... The running state of the program is called a process or task.... During the execution of such processes, the OS protects the memory space reserved for one process from other processes....
6 Pages (1500 words) Case Study
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us