Open source software and Linux introduction, Essays (university) of Computer Science

Introduction to open source, need, principles , development and advantages are discussed. Linux OScharacteristics, process, signals, scheduling and memory are discusses

Typology: Essays (university)

2017/2018

Uploaded on 02/28/2018

.19429
.19429 🇬🇧

4

(1)

2 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UNIT I INTRODUCTION
Introduction to Open sources – Need of Open Sources – Advantages of Open Sources
–Application of Open Sources. Open source operating systems: LINUX: Introduction –
General Overview Kernel Mode and user mode – Process – Advanced Concepts
Scheduling – Personalities – Cloning – Signals – Development with Linux. .
Introduction to Open Sources or The principles of Open Source Software
Open source doesn't just mean access to the source code. The distribution terms
of open-source software must fulfill with the following criteria:
1. Free Redistribution
The license shall not restrict any party from selling or giving away the software as a
component of an aggregate software distribution containing programs from several
different sources. The license shall not require a royalty or other fee for such sale.
2. Source Code
The program must include source code, and must allow distribution in source code as
well as compiled form. Where some form of a product is not distributed with source
code, there must be a well-publicized means of obtaining the source code for no more
than a reasonable reproduction cost preferably, downloading via the Internet without
charge. The source code must be the preferred form in which a programmer would
modify the program. Deliberately obfuscated source code is not allowed. Intermediate
forms such as the output of a preprocessor or translator are not allowed.
3. Derived Works
The license must allow modifications and derived works, and must allow them to be
distributed under the same terms as the license of the original software.
4. Integrity of the Author's Source Code
The license may restrict source-code from being distributed in modified form only if the
license allows the distribution of "patch files" with the source code for the purpose of
modifying the program at build time. The license must explicitly permit distribution of
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Open source software and Linux introduction and more Essays (university) Computer Science in PDF only on Docsity!

UNIT I INTRODUCTION

Introduction to Open sources – Need of Open Sources – Advantages of Open Sources –Application of Open Sources. Open source operating systems: LINUX: Introduction – General Overview – Kernel Mode and user mode – Process – Advanced Concepts – Scheduling – Personalities – Cloning – Signals – Development with Linux..

Introduction to Open Sources or The principles of Open Source Software Open source doesn't just mean access to the source code. The distribution terms of open-source software must fulfill with the following criteria:

1. Free Redistribution

The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale.

2. Source Code

The program must include source code, and must allow distribution in source code as well as compiled form. Where some form of a product is not distributed with source code, there must be a well-publicized means of obtaining the source code for no more than a reasonable reproduction cost preferably, downloading via the Internet without charge. The source code must be the preferred form in which a programmer would modify the program. Deliberately obfuscated source code is not allowed. Intermediate forms such as the output of a preprocessor or translator are not allowed.

3. Derived Works

The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software.

4. Integrity of the Author's Source Code

The license may restrict source-code from being distributed in modified form only^ if the license allows the distribution of "patch files" with the source code for the purpose of modifying the program at build time. The license must explicitly permit distribution of

software built from modified source code. The license may require derived works to carry a different name or version number from the original software.

5. No Discrimination against Persons or Groups

The license must not discriminate against any person or group of persons.

6. No Discrimination against Fields of Endeavor

The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

7. Distribution of License

The rights attached to the program must apply to all to whom the program is redistributed without the need for execution of an additional license by those parties.

8. License Must Not Be Specific to a Product

The rights attached to the program must not depend on the program's being part of a particular software distribution. If the program is extracted from that distribution and used or distributed within the terms of the program's license, all parties to whom the program is redistributed should have the same rights as those that are granted in conjunction with the original software distribution.

9. License Must Not Restrict Other Software

The license must not place restrictions on other software that is distributed along with the licensed software. For example, the license must not insist that all other programs distributed on the same medium must be open-source software.

10. License Must Be Technology-Neutral

No provision of the license may be predicated on any individual technology or style of interface.

Definition of Open Source:

A defined set of requirements for open source software from the Open Source Initiative (OSI). The Open Source Definition (OSD) specifies not only access to the source code, but also integrity of the code, its free redistribution, a technology-neutral provision, as well as specific anti-discrimination rules.

  1. Access to source code and the ability to customize if you desire. You can see the code, change the code, and even submit your enhancements and/or fixes back to the community to be peer reviewed and possibly added to the next build. No longer do you need to wait for a vendor roadmap that doesn't have the feature you need until their Excalibur release in the fall of 2009.
  2. Great negotiating power when dealing with closed source vendors. Tired of vendors pushing you around because you don't have options? I wonder if companies like Microsoft would be more willing to be flexible with their pricing if you have 20 desktops running Ubuntu as an alternative desktop pilot initiative.
  3. Feature set is not bloated and is driven by collaboration amongst the community. Tired of products that consume huge amounts of memory and CPU power for the 2000 eye candy features that you will never use? With open source software, most features are driven by community demand. Closed vendors have to create one more feature then their competitors to get the edge in the marketplace.
  4. Bug fixes are implemented faster then closed source vendors. Actually, many bugs are fixed by the community before they are even reported by the users.

Advantages of using Open Source

Below are some of the advantages that open source offers:

1. Core software is free

If you're just getting started in online business, cost can be a major factor. Using Open Source software can really cut down on your initial capital outlay. It's also my firm belief that the Open Source community has helped to rein in prices on commercial software over the years.

2. Evolving software

As mentioned, some Open Source software projects can have huge communities of programmers involved, allowing for the rapid implementation of new features and security fixes. The communities of users and programmers are also invaluable

resources for asking questions relating to troubleshooting and suggesting enhancements.

3. Encourages hands on

When you're short on cash, you are more than likely to want to make modifications to software yourself. I'm no programmer, but the use of Open Source software has encouraged me to go beyond the user interface; to dig into code to try and understand what it does and to make minor edits. As a business owner, it doesn't hurt to understand a little of the voodoo that goes on behind the scenes in the software you use

on your site.

4. Not tied to a single vendor

If you purchase a commercial application, you can then become reliant on a single company to solve your problems and maintain the software - which can also be very expensive. Some commercial software companies may only provide support and upgrades for a limited time before you need to fork out for any further enhancements or assistance.

5. Greater Security & Quality

Open source software is available publicly. A large amount of developers globally contribute and analyze the code making it more secure and constantly increasing the quality. The peer review process drive excellence in design.

Disadvantages of using Open Source

Most of the disadvantages only apply if you're not somewhat code-savvy and willing to get your hands dirty:

  1. Mostly used commercial applications.
  2. Projects can die
  3. Support issues

Application of Open Sources

  1. (^) Accounting

9 Software Development Tools for C, C++ Sun Studio 10 Server and Client Linux distribution Ubuntu

LINUX: Introduction

What is Linux?

Linux is a UNIX-based operating system originally developed as for Intel- compatible PC's. It is now available for most types of hardware platforms, ranging from PDAs (and according to some reports, a wristwatch) to mainframes. Linux is a "modern

operating system", meaning it has such features as virtual memory, memory protection, and preemptive multitasking.

Why use Linux?

Reasons to Install Linux

  • Configurability
  • Convenience
  • Stability
  • Community
  • Freedom

Configurability

Linux distributions give the user full access to configure just about any aspect of their system. Options range from the simple and straightforward (for instance, changing the background image) to the more esoteric (for instance, making the "Caps Lock" key behave like "Control"). Almost any aspect of the user experience can be configured.

Convenience

While Linux takes some effort to get set up, once it is set up, it is surprisingly low- maintenance. Package management can simply be a matter of running two commands in the shell. Linux also offers complete remote access. This allows the user to act exactly as if she is sitting at that computer’s desk, potentially across town or on the other side of the world.

Stability

Linux is based on the UNIX kernel. It provides preemptive multitasking and protected memory. Preemptive multitasking prevents any application from permanently stealing the CPU and locking up the machine. Protected memory prevents applications from interfering with and crashing one-another.

In user mode the executing code has no ability to directly access hardware or reference memory. Code running in user mode must delegate to system AP!’s to access hardware or memory. Due to the protection afforded by this set of isolation crashes in user mode are always recoverable. Most of the code running on your computer will execute in user mode.

b) Kernel Mode:

A mode of the CPU when running a program in this mode, it is the kernels that is running on behalf of the user process and directly access the kernel data structures or the kernel programs.

Once the system call returns, the CPU switches back to user mode. The kernel mode program runs in the background making sure everything runs smoothly things like printer drivers, display drivers, drivers that interface with the monitor, keyboard, mouse etc. These programs all run in such a way that you don’t notice them.

When the computer boots up, Windows calls the KERNEL, the main kernel-mode program that allows all the other programs to run, even the user mode programs. Kernel mode is also referred to as system mode, is one of the two distinct mode of operation of the CPU in Linux. When the CPU is in kernel mode, it is assumed to be executing trusted software and thus it can execute any instructions and reference any memory address. The trusted

Process:

A process is an instance of a running process. Processes are also referred to as tasks. Process: All software that runs within an operating system concept known as process and each program running on a system is therefore assigned its own process ID (PID). It can easily obtain a process list in order to know which process is running

Multi-user and multi-tasking:

Multiuser refers to having more than one person able to log into the computer and even have their own settings. Multitasking is the ability of the to do more than one thing at a time.

Not every command starts a single process. Some commands initiate a series of processes, such as mozilla; others, like ls, are executed as a single command.

Linux is based on UNIX, where it has been common policy to have multiple users running multiple commands, at the same time and on the same system.

Process types

a) Interactive processes

Interactive processes are initialized and controlled through a terminal session. In other words, there has to be someone connected to the system to start these processes; they are not started automatically as part of the system functions. These processes can run in the foreground, occupying the terminal that started the program,

Running a process in the background is only useful for programs that don't need user input. Putting a job in the background is typically done when execution of a job is expected to take a long time

Table Controlling processes command Meaning regular_command Runs this command in the foreground. command & Run this command in the background (release the terminal) jobs Show commands running in the background. Ctrl+Z Suspend (stop, but not quit) a process running in the foreground (suspend). Ctrl+C Interrupt (terminate and quit) a process running in the foreground. %n Every process running in the background gets a number assigned to it. By using the % expression a job can be referred to using its number, for instance fg %2. bg Reactivate a suspended program in the background. fg Puts the job back in the foreground. kill End a process (also see Shell Builtin Commands in the Info pages of bash)

b) Automatic processes

Automatic or batch processes are not connected to a terminal. Rather, these are tasks that can be queued into a spooler area, where they wait to be executed on a FIFO (first-in, first-out) basis. Such tasks can be executed using one of two criteria:

  • At certain date and time: done using the at command.
  • At times when the total system load is low enough to accept extra jobs: done using the batch command.
  • Batch processing is also used for optimizing system performance.

c) Daemons

Daemons are server processes that run continuously. They are initialized at system startup and then wait in the background until their service is required. A typical example is the networking daemon, xinetd, which is started in almost every boot procedure. After the system is booted, the network daemon just sits and waits until a client program, such as an FTP client, needs to connect.

When a process ends normally (it is not killed or otherwise unexpectedly interrupted), the program returns its exit status to the parent. This exit status is a number returned by the program providing the results of the program's execution. Signals Processes end because they receive a signal. There are multiple signals that you can send to a process. Use the kill command to send a signal to a process. The commands kill -l shows a list of signals. Most signals are for internal use by the system or for programmers when they write code.

Table: Common signals

Signal name Signal number Meaning SIGTERM 15 Terminate the process in an orderly way. SIGINT 2 Interrupt the process. A process can ignore this signal. SIGKILL 9 Interrupt the process. A process can not ignore this signal. SIGHUP rr 1 For daemons: reread the configuration file.

The boot process The BIOS provides the lowest level interface to peripheral devices and controls the first step of the boot process. The BIOS tests the system, looks for and checks peripherals, and then looks for a drive to use to boot the system. Once Linux is installed on the hard drive of a system, the BIOS looks for a Master Boot Record (MBR) starting at the first sector on the first hard drive, loads its contents into memory, then passes control to it. This MBR contains instructions on how to load the GRUB (or LILO) boot-loader, using a pre-selected operating system. The MBR then loads the boot-loader, which takes over the process

Personalities in Linux Linux supports different execution domains, or personalities, for each process. Among other things, execution domains tell Linux how to map signal numbers into signal actions. The execution domain system allows Linux to provide limited support for binaries compiled under other UNIX-like operating systems.

A list of the available execution domains can be found in .

Name:

Personality - Set the process execution domain

Synopsis:

include

int personality(unsigned long persona);

Return Value

On success, the previous persona is returned. On error, -1 is returned, and errno is set appropriately.