Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit5FIT (1) (1)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Unit-5 FIT

Operating System:
Functions, Measuring System Performance, Assemblers, Compilers and Interpreters.Batch
Processing, Multiprogramming, Multi Tasking, Multiprocessing, Time Sharing, DOS, Windows,
Unix/Linux.

Operating System: Functions

Functions of OS are:
• Memory Management.
• Process Management/CPU Scheduling.
• Device Management.
• File Management.
• Security.
• Accounting.
• Error detection etc.
Operating System is used as a communication channel between the Computer
hardware and the user.

responsibilities:
• It controls all the computer resources.
• It provides valuable services to user programs.
• It coordinates the execution of user programs.
• t hides the complexity of software.
• It supports multiple execution modes.
• It monitors the execution of user programs to prevent errors.

Functions of an Operating System


Memory Management
An Operating System performs the following activities for Memory Management:
• It keeps track of primary memory, i.e., which bytes of memory are used by
which user program. The memory addresses that have already been
allocated and the memory addresses of the memory that has not yet been
used.
• In multiprogramming, the OS decides the order in which processes are
granted memory access, and for how long.
• It Allocates the memory to a process when the process requests it and
deallocates the memory when the process has terminated or is performing
an I/O operation.

Processor Management

The process is a program under the execution.


The operating system manages all the processes so that each process
gets the CPU for a specific time to execute itself, and there will be less
waiting time for each process. This management is also called process
scheduling.

o First Come First Serve (FCFS) Algorithm: In this algorithm, which comes first is
served first by the CPU until it is completed. It is a non-preemptive algorithm which
means it cannot be terminated without completing it.
o Shortest Job First (SJF) Algorithm: The process which has the shortest burst time
(execution time) that will be served first by the CPU.
o Longest Job First (LJF) Algorithm: This algorithm is based on the phenomenon
that the process that has the longest execution time will be served first by the
processor.
o Round Robin Algorithm: In this algorithm, there is a specific time quanta
assigned for each process. If the process is not executed in time quanta, it is sent
to the waiting queue for its next turn.
o Priority Scheduling Algorithm: Processes are given the priority based on
different criteria and scheduled according to the highest priority. Criteria can be
burst time or arrival time etc.

Device Management
An OS manages device communication via its respective drivers.

Keeps track of all devices connected to the system. designates a program


responsible for every device known as the Input/Output controller

Allocates devices effectively and efficiently. Deallocates devices when they are
no longer required.
There are various input and output devices. an OS controls the working of these
input-output devices .
It receives the requests from these devices, performs a specific task, and
communicates back to the requesting process.

File Management.

A file system is organized into directories for efficient or easy navigation and
usage. These directories may contain other directories and other files
An OS keeps track of information regarding the creation, deletion, transfer, copy,
and storage of files in an organized way.
It also maintains the integrity of the data stored in these files, including the file
directory structure, by protecting against unauthorized access.

Security.
The operating system uses password protection to protect user data and similar
other techniques. it also prevents unauthorized access to programs and user data

• Protection against unauthorized access through login.


• Protection against intrusion by keeping firewall active.
• Protecting the system memory against malicious access.
• Displaying messages related to system vulnerabilitie

Accounting

In a multitasking OS where multiple programs run simultaneously, the OS


determines which applications should run in which order and how time
should be allocated to each application.

Error detection

The operating system constantly monitors the system to detect errors and avoid
malfunctioning computer systems.
From time to time, the operating system checks the system for any external
threat or malicious software activity.
It also checks the hardware for any type of damage.

Measuring System Performance


example

• vmstat: Reports statistics about virtual memory, disks, traps, and CPU activity. It is used
to dcover system load activity.

• iostat: Reports CPU and input/output statistics for disks, and CD-ROMS.
• monitor (AIX® platform): Starts and stops profiling.
• sar: Records and reports a broad variety of system statistics.
• netstat: Records and reports network activity by displaying the contents of various
network-related data structures.
Here are some common methods and metrics used to measure system performance in an
operating system:
CPU Utilization:
CPU utilization measures how much of the CPU's processing power is being used. It is usually
expressed as a percentage. High CPU utilization can indicate that the CPU is a bottleneck.
Memory Usage:
Monitoring memory usage is essential to ensure that there is enough RAM available for running
processes. Metrics like free memory, used memory, and swap usage are important in this context.
Disk I/O:
Disk input/output (I/O) performance measures how fast data can be read from and written to the
storage devices. Key metrics include read and write throughput, IOPS (Input/Output Operations
Per Second), and disk latency.
Network Throughput:
Network performance metrics measure the rate at which data is transmitted over the network.
This includes metrics like bandwidth utilization, latency, and packet loss.
Response Time:
Response time measures how long it takes for a system to respond to a request or an action. It
can be specific to various components, such as application response time, database query
response time, or web server response time.
System Load:
System load average indicates the number of processes in the run queue, waiting to be executed.
High load averages may suggest system resource contention.
Page Faults:
Page faults occur when a program tries to access a part of memory that is not currently in RAM.
High page fault rates may indicate memory pressure.
Interrupts and Context Switches:
Interrupts and context switches measure the frequency at which the CPU switches between
different tasks
Assemblers, Compilers and Interpreters

Assemblers, compilers, and interpreters are three different types of language translators used in
the field of computer programming and software development.

They serve the purpose of converting high-level programming languages or assembly


language into machine code that can be executed by a computer's CPU.

Assemblers

Purpose:

Assemblers are used to translate assembly language code into machine code.
Assembly language is a low-level programming language that is specific to a particular computer
architecture.
Translation Process: Assemblers perform a one-to-one translation of assembly language
instructions into machine code instructions.
Each assembly language instruction corresponds to a specific machine code instruction.(opcode-
operation code)
Output:
The output of an assembler is typically an object file or binary executable that can be run directly
on the target computer's CPU.
Efficiency:
Assemblers produce highly efficient code because they generate machine code specific to the
hardware architecture.
Debugging: Debugging can be more challenging with assembly language because it is closer to
machine code, making it less human-readable than high-level languages.
Examples: NASM (Netwide Assembler), GAS (GNU Assembler)
ADD
SUB
MUL

Types of assembler

✓ One pass assembler


✓ Two pass assembler

One-Pass Assemblers:
Usage: One-pass assemblers scan the assembly code only once, generating machine code in a
single pass. They are suitable for small or simple assembly programs.
Advantages:
Efficient use of memory and processing power since they perform a single pass.
Faster assembly for small programs.
Disadvantages:
Limited support for forward references (labels that are defined later in the code).

Two-Pass Assemblers:
Usage: Two-pass assemblers read the assembly code twice. In the first pass, they gather symbol
information and calculate memory addresses. In the second pass, they generate machine code.

Working of Pass-2:
Pass-2 of assembler generates machine code by converting symbolic machine-opcodes into their
respective bit configuration(machine understandable form).

MOT table(machine opcode table)


2. POT table(pseudo opcode table)
3. Base table(storing value of base register)
4. LC ( location counter)

Advantages:
Support for forward references, making them suitable for complex programs.
Improved error checking and reporting.
Disadvantages:
Slower than one-pass assemblers due to two passes over the code.
May require more memory and storage for intermediate data.
Example1

a simple assembly program code to add two numbers in c program.

#include<stdio.h>
void main() {
int a = 10, b = 20, c;

asm {
mov ax,a
mov bx,b
add ax,bx
mov c,ax
}

printf("c= %d",c);
}

Output:
c= 30

example2

Assembly Program:
Label Op-code operand LC value(Location counter)
JOHN START 200
MOVER R1, ='3' 200
MOVEM R1, X 201
L1 MOVER R2, ='2' 202
LTORG 203
X DS 1 204
END 205
Compiler:
Purpose:
Compilers are used to translate high-level programming languages (e.g., C, C++, Java) into
machine code or an intermediate code (e.g., bytecode).
High-level languages are more human-readable and portable than assembly language.
Translation Process:
Compilers perform a two-step process:
a. Compilation:
They translate the entire source code into an intermediate representation or machine code.
b. Linking (if necessary):
They link various object files and libraries together to create an executable program.

Output: The output of a compiler is typically an executable file that can be run on the target
platform.

Efficiency: Compiled code is usually more efficient than interpreted code because it is optimized
during the compilation process.

Debugging: Debugging can be easier in high-level languages since they offer better abstractions
and debugging tools. However, debugging compiled code may be more challenging than
debugging interpreted code due to optimization and code transformations.
Examples: GCC (GNU Compiler Collection), Clang (C/C++ Compiler), Java Compiler.

Advantages of Compiler

• Compiled code runs faster in comparison to Interpreted code.


• Compilers help in improving the security of Applications.
• As Compilers give Debugging tools, which help in fixing errors easily.

Disadvantages of Compiler
• The compiler can catch only syntax errors and some semantic errors.
• Compilation can take more time in the case of bulky code.

Steps of Programming:
• Program Creation.
• Analysis of language by the compiler and throws errors in case of any incorrect
statement.
• In case of no error, the Compiler converts the source code to Machine Code.
• Linking of various code files into a runnable program.
• Finally runs a Program.

Example program for addition of two numbers using C

void main()
{
int a=5;
int b=6;
int c= a+b;
printf ( “ the sum is %d”, c);
getch();
}

Output
The sum is 11

Example 2

void main()
{
Printf(“hello world”);
}
Output
Hello world
Complier Interpreter

Errors are displayed in Compiler after


Compiling together at the current Errors are displayed in every single line.
time.

The compiler can see code upfront


The Interpreter works by line working of
which helps in running the code
Code, that’s why Optimization is a little
faster because of performing
slower compared to Compilers.
Optimization.

It does not require source code for It requires source code for later
later execution. execution.

Execution of the program takes place


Execution of the program happens after
only after the whole program is
every line is checked or evaluated.
compiled.

Compilers more often take a large


In comparison, Interpreters take less time
amount of time for analyzing the
for analyzing the source code.
source code.

CPU utilization is more in the case of CPU utilization is less in the case of a
a Compiler. Interpreter.

The use of Interpreters is mostly in


The use of Compilers mostly
Programming and Development
happens in Production Environment.
Environments.
Object code is permanently saved for
No object code is saved for future use.
future use.

C, C++, C#, etc are programming Python, Ruby, etc are programming
languages that are compiler-based. languages that are interpreter-based.

Interpreter

Purpose:
Interpreters are used to execute high-level programming languages directly without the need for
a separate compilation step. They read and execute the source code line by line.

Translation Process:
Interpreters translate and execute code line by line at runtime, without generating a separate
machine code file.
Output: Interpreters do not produce a separate executable file; they execute the code directly
from the source.
Efficiency: Interpreted code tends to be slower than compiled code because it is translated and
executed line by line, without the optimizations that compilers perform.
Debugging:
Debugging is often easier with interpreters because they can provide immediate feedback,
allowing developers to identify and fix issues as they occur.

Examples: Python Interpreter, Ruby Interpreter, JavaScript Interpreter

Advantage
The advantage of the interpreter is that it is executed line by line which helps users to find errors
easily.
Disadvantage
it takes more time to execute successfully than the compiler.

Example program for interpreter


program to add two numbers

num1 = 15
num2 = 12

sum = num1 + num2

# printing values
print( sum)

output

27
Example 2

Example

print("Hello World!")

Output

Hello World!

Batch processing
Batch processing is a type of processing in which a computer system processes multiple tasks or
jobs in a sequence without the need for user interaction.

Usage
Batch processing is commonly used in operating systems for various purposes, such as running
large-scale data processing jobs, executing repetitive tasks, and managing system resources
efficiently.

Diagram

some key aspects of batch processing in operating systems:


Job Scheduling:
The operating system's batch processing system schedules these jobs based on priorities,
resource availability, and other criteria. It determines which jobs should run next.

Job Execution:
The jobs are processed one by one without user intervention. The operating system loads each
job into memory, executes it, and manages its resources. Once a job completes, the results are
typically stored or sent to output devices.
Spooling:
Input and output data may be spooled (simultaneously read/written to disk) to prevent data loss
and to facilitate job execution. This allows one job to read its input data while another job writes
its output data, improving overall system efficiency.
Error Handling: Batch processing systems need robust error handling mechanisms. If a job
encounters an error, the system may log the issue, skip the problematic job, and continue
processing other jobs.
Resource Management: The operating system ensures that each job gets the necessary
resources (CPU time, memory, I/O devices) without causing resource conflicts with other jobs.

Job Prioritization: Jobs are typically assigned priorities, which determine their order of
execution. Higher priority jobs are processed before lower priority jobs.

Batch Monitoring: Operators or administrators can monitor the progress of batch jobs and
intervene when necessary. They may also be responsible for maintaining the hardware and
resolving issues.

Advantages
It isn't easy to forecast how long it will take to complete a job; only batch system processors

know how long it will take to finish the job in line.

This system can easily manage large jobs again and again.

The batch process can be divided into several stages to increase processing speed.

When a process is finished, the next job from the job spool is run without any user interaction.
CPU utilization gets improved.
Disadvantages
:
When a job fails once, it must be scheduled to be completed, and it may take a long time to
complete the task.
Computer operators must have full knowledge of batch systems.
The batch system is quite difficult to debug.
The computer system and the user have no direct interaction.

Multiprogramming

Multiprogramming is a key concept in operating systems, and it refers to a technique where


multiple programs are loaded into the computer's memory and executed concurrently.

Usage
The primary goal of multiprogramming is to maximize CPU utilization and overall system
throughput by overlapping CPU and I/O operations
Diagram

Benefits of multiprogramming in operating systems:


Improved CPU Utilization: In a single-user, single-program system, the CPU may sit idle
during I/O operations or other wait times. Multiprogramming allows the CPU to switch to
another program while one program is waiting, effectively utilizing the CPU's processing power.

Reduced Response Time:


By allowing multiple programs to run concurrently, an operating system can provide faster
response times to users. Even if one program is performing a lengthy operation, other programs
can still execute.
Enhanced Throughput:
Multiprogramming can significantly increase the system's throughput by executing multiple
programs in parallel. This is particularly important in multi-user environments where many users
need to run their applications simultaneously.
Resource Allocation:
The operating system must manage resources effectively in a multiprogramming environment. It
allocates CPU time, memory, and I/O devices to different programs, ensuring fair and efficient
resource usage.
Context Switching:
The operating system must switch between programs efficiently. This process is known as
context switching, where the system saves the state of one program and loads the state of
another. Context switching overhead can impact system performance, so it needs to be
minimized.
Scheduling Algorithms: The operating system uses scheduling algorithms to determine which
program should run next. Different scheduling policies, such as round-robin, priority-based, or
shortest job first, are used to make this decision.
Memory Management: Multiprogramming requires effective memory management to allocate
memory to multiple programs without conflicts. Techniques like virtual memory are often used
to provide the illusion of a larger memory space to programs.
I/O Device Management: The operating system must manage I/O devices efficiently to ensure
that programs can perform I/O operations without significant delays. Techniques like buffering,
spooling, and interrupt-driven I/O are employed.

Advantages
✓ It provides less response time.
✓ It may help to run various jobs in a single application simultaneously.
✓ It helps to optimize the total job throughput of the computer.
✓ Various users may use the multiprogramming system at once.
✓ Short-time jobs are done quickly in comparison to long-time jobs

Disadvantages

✓ It is highly complicated and sophisticated.


✓ The CPU scheduling is required.
✓ Memory management is needed in the operating system because all types of tasks are stored in
the main memory.
✓ The harder task is to handle all processes and tasks.

Multi Tasking

Multitasking in an operating system (OS) refers to the ability of the OS to manage and switch

between multiple tasks or processes concurrently

usage

Multitasking is a fundamental feature of modern operating systems, enabling efficient and


productive use of computers.
Diagram

some key aspects of multitasking in an OS:


Task or Process: A task or process is a program or application that is running on the computer.
Each task has its own memory space and execution context.

CPU Scheduling: The OS employs a CPU scheduling algorithm to determine which task should
execute next. It allocates CPU time to different tasks based on priority, time slices, or other
criteria.
Context Switching: When the OS switches from one task to another, it performs a context
switch. This involves saving the current task's context (register values, program counter, etc.)
and loading the context of the next task. Context switching is a crucial operation in multitasking.
Parallelism: Multitasking can provide the appearance of parallelism, even on a single-core CPU.
Tasks are given time slices to execute, and they take turns using the CPU, creating the illusion of
simultaneous operation.
Multithreading: Some modern operating systems support multithreading, where a single
process is divided into multiple threads. Threads share the same memory space and resources
within a process, making communication and data sharing between threads more efficient.
Real-Time and Non-Real-Time:
Operating systems can support real-time multitasking for systems that require predictable and
immediate responses to events. Non-real-time multitasking is used for general-purpose
computing.
Inter-Process Communication (IPC): In a multitasking environment, tasks often need to
communicate or share data. The OS provides mechanisms for IPC, such as pipes, sockets, and
message queues.
Priority Levels: Some tasks or processes may be given higher or lower priorities based on their
importance or criticality. The OS schedules tasks according to their priority levels.
Resource Management: Multitasking OSes manage system resources like memory, I/O devices,
and network connections among multiple tasks, ensuring fair and efficient resource utilization.

The followings are the advantages and disadvantages of Multitasking


Operating System:

Advantages Disadvantages

Do more things at once Resource Management Issues

Save time Security Risks

Better organization Complexity

More efficient use of resources Learning Curve

Better user experience Overhead

Explain Multiprocessing in detail


Multiprocessing is the use of two or more central processing units (CPUs) within a single
computer system.
Diagram
The term also refers to the ability of a system to support more than one processor or the ability
to allocate tasks between them.

Types of multiprocessing systems

✓ Symmetrical multiprocessing operating system


✓ Asymmetric multiprocessing operating system

Symmetrical multiprocessing operating system

In a Symmetrical multiprocessing system, each processor executes the same copy of the
operating system, takes its own decisions, and cooperates with other processes to smooth the
entire functioning of the system.

Asymmetric multiprocessing operating system

In an asymmetric multiprocessing system, there is a master slave relationship between the


processors.

Further, one processor may act as a master processor or supervisor processor while others are
treated as slave

Some Key aspects of Multiprocessing

Process:
A process is an independent program in execution. Each process has its own memory space,
system resources, and can execute independently of other processes. Processes are managed by
the operating system, which schedules them for execution.
Concurrency:
Concurrency is the property of multiple processes running at the same time. It gives the illusion
that multiple tasks are being executed simultaneously. In reality, the CPU rapidly switches
between processes, allowing them to make progress.
Multitasking:
Multitasking is a specific form of concurrency where the CPU switches between processes so
quickly that it appears as if all the tasks are running simultaneously. This is commonly used in
modern operating systems to provide a responsive and efficient environment for users.
Process Scheduling:
The operating system is responsible for scheduling processes and deciding which process to run
next. Process scheduling algorithms determine the order in which processes get access to the
CPU.
Multiprocessing: Multiprocessing, in the context of operating systems, refers to systems that
have multiple CPUs (Central Processing Units) or CPU cores. With multiprocessing, multiple
processes can be executed truly simultaneously because each CPU or core can run its own
process. This leads to improved performance and better multitasking.
Parallel Processing: In a multiprocessing system, if processes are specifically designed to run
on different CPUs or cores, it's called parallel processing

Advantages

o Increased reliability: Due to the multiprocessing system, processing tasks can be


distributed among several processors. This increases reliability as if one processor
fails; the task can be given to another processor for completion.
o Increased throughout: As several processors increase, more work can be done in
less
o The economy of Scale: As multiprocessors systems share peripherals, secondary
storage devices, and power supplies, they are relatively cheaper than single-
processor systems.

Disadvantages

o Operating system of multiprocessing is more complex and sophisticated as it takes


care of multiple CPUs at the same time.

Explain Time Sharing in Detail

Time sharing, refers to the ability of an operating system to allocate CPU time to multiple tasks
or processes in a way that gives the illusion of parallel execution, even though there is only one
CPU.

Usage

It is essential in modern operating systems, as it allows multiple applications to run on a single


machine simultaneously, providing a responsive and efficient computing environment for users.

Diagram
1. Active State – The user’s program is under the control of the CPU. Only one
program is available in this state.
2. Ready State – The user program is ready to execute but it is waiting for its
turn to get the CPU. More than one user can be in a ready state at a time.
3. Waiting State – The user’s program is waiting for some input/output
operation. More than one user can be in a waiting state at a time.

Some key aspects of Time sharing

Time Slicing:
In time sharing systems, the CPU time is divided into small time slices or time quanta. Each
process is allocated a time slice during which it can execute. When the time slice expires, the
operating system switches to another process. This gives the appearance of concurrent execution,
as each process gets a fair share of CPU time.
Context Switching:

The operating system needs to save the state of the currently executing process and load the state
of the next process when switching between them. This operation is called a context switch. It
ensures that the CPU can seamlessly switch between multiple processes without any noticeable
interruption.
Fairness: Time sharing systems aim to provide fairness to all running processes.

response Time:
Time sharing systems are designed to provide quick response times to user inputs. Interactive
tasks like typing on a keyboard or clicking a mouse button require rapid responses, and time
sharing ensures that the operating system can quickly switch to these tasks.
Resource Sharing:
Time sharing also extends beyond CPU time. It includes sharing other system resources like
memory, input/output devices, and peripherals. Operating systems must manage these resources
effectively to ensure efficient time sharing.
Advantages
✓ Each task gets an equal opportunity.
✓ Fewer chances of duplication of software.
✓ CPU idle time can be reduced.

Disadvantages
✓ Reliability problem.
✓ One must have to take of the security and integrity of user programs and data.
✓ Data communication problem.

Explain DOS in detail

A disk operating system (DOS) is a type of operating system that manages data
on a disk storage device.

It was widely used in the 1980s and 1990s,


DOS: DOS is a text-based command-line interface. Users interact with it by typing commands
and navigating through directories using text-based commands
Usage
DOS commands are also useful for troubleshooting and fixing problems on
older systems.

(DOS) is a type of computer software that helps manage files and data stored
on a computer's disk drive.

Command-Line Interface: DOS primarily used a command-line interface, where users


interacted with the system by typing text-based commands.

File System: DOS used a file system that was typically based on FAT (File Allocation Table).
FAT file systems are relatively simple and were widely used in early PCs.

Diagram
Types of DOS Commands
• Internal Commands − Internal commands are the commands that are built into the command
interpreter or the command prompt of the DOS operating system.

External commands
In DOS are commands that are not built into the command interpreter, but are separate
executable files that need to be located in the system's path

Example Internal DOS commands


• DIR − Displays a list of files and directories in the current directory.
• CD − Changes the current directory to a specified directory.
• MD − Creates a new directory.
• RD − Removes an empty directory.
• COPY − Copies a file from one location to another.
• DEL − Deletes a file.
• REN − Renames a file or directory.
• TYPE − Displays the contents of a text file.
• ECHO − Displays messages or turns command echoing on or off.
• VER − Displays the version number of the operating system.
• DATE − Displays or sets the system date.
• TIME − Displays or sets the system time.
• CLS − Clears the screen.

External DOS Commands

• ATTR − Displays or changes file attributes.


• CMDKEY − Creates, lists, or deletes stored user names and passwords or credentials.
• EXIT − Exits the command interpreter or batch script.
• FORMAT − Formats a disk for use with Windows.

Limitations
✓ Do use the correct syntax for each command
✓ Don't use spaces in file or directory names

Limited Memory Management:

DOS was designed to work with limited memory (typically 640 KB of conventional memory).
This memory limitation was a significant constraint on the software that could be run.

Explain Windows operating System

Windows is an operating system developed by Microsoft. It comes in various versions, with


Windows 10 and Windows 11

Windows:
Windows provides a graphical user interface (GUI) with windows, icons, and a mouse pointer.
It's more user-friendly and intuitive for most users.
Windows 1.0 (1985):
The first version of Windows was more of a graphical user interface (GUI)

Windows 2000 (2000): Windows 2000 was part of the NT (New Technology) series and was
aimed at business users. It brought better stability and security.

Diagram
Key benefits

Graphical User Interface (GUI): Windows is known for its user-friendly GUI, featuring a
desktop with icons, a taskbar, and a start menu. This makes it accessible to a broad range of
users.
Multitasking: Windows supports multitasking, allowing users to run multiple applications
simultaneously. This is essential for productivity.

File System: NTFS (New Technology File System) is the primary file system used in Windows.
It offers features like file encryption, disk quotas, and file compression.

Software Compatibility: Windows has a vast library of software and applications, including
office suites, games, and productivity tools.

User Accounts: Windows allows for the creation of multiple user accounts, each with its own
settings, preferences, and access controls. This is important for shared or family computers.

Security: Security is a major concern, and Windows provides features such as Windows
Defender (antivirus), Windows Firewall, and user account controls to help protect against
malware and unauthorized access.

Hardware Compatibility: Windows supports a wide range of hardware, making it compatible


with various computer configurations.
Windows Commands

File and Directory Operations:


dir: List files and directories in the current directory.
cd: Change the current directory.
mkdir: Create a new directory.
rmdir or rd: Remove a directory.
copy: Copy files or directories.
move: Move or rename files or directories.
File Manipulation:
type: Display the contents of a text file.
del or erase: Delete a file.
ren or rename: Rename a file or directory.
attrib: Change file attributes.
Networking:
ipconfig: Display network configuration information.
System Utilities:
tasklist: List running processes.
taskkill: Terminate processes.

Linux operating System

was created by Linus Torvalds in 1991.

Kernel:

Linux: Linux has a monolithic kernel that is open source. The kernel is at the core of the
operating system and is responsible for managing hardware resources.

Linux: Linux is widely used in both commercial and non-commercial environments, from data
centers and embedded systems to desktop computers and mobile devices.
1.
• Linux is typically more cost-effective because it is open source, and
many distributions are freely available. Support can be obtained through
various channels, including community forums and paid services.
Diagram

Linux commands

Navigating the File System:


pwd:
Print the working directory.
cd:
Change the current directory.
ls:
List files and directories in the current directory.
mkdir:
Create a new directory.
rmdir: Remove an empty directory.
rm: Remove files or directories.
File Operations:
touch: Create an empty file.
cp: Copy files and directories.
mv: Move or rename files and directories.
cat: Display the contents of a file
Managing Processes:
kill: Terminate a process.

Advantages of Linux

• The software updates in Linux are easy and frequent.


• Various Linux distributions are available so that you can use them according
to your requirements or according to your taste.
• Linux is freely available to use on the internet.
• It has large community support.
• It provides high stability. It rarely slows down or freezes and there is no need
to reboot it after a short time.
• It maintain the privacy of the user.
• The performance of the Linux system is much higher than other operating
systems. It allows a large number of people to work at the same time and it
handles them efficiently.
• It is network friendly.

Disadvantages of Linux

• It is not very user-friendly. So, it may be confusing for beginners.


• It has small peripheral hardware drivers as compared to windows.

Unix operating system

It was developed in the 1970s by Ken Thompson, Dennis Ritchie, and others in
the AT&T Laboratories.
Unix was originally designed to run on large, expensive mainframe computers,
while Linux was designed to run on commodity hardware like PCs and servers.

UNIX is to provide simple, powerful tools that can be combined to perform


complex tasks. It features a command-line interface that allows users to interact
with the system through a series of commands, rather than through a graphical
user interface (GUI).

Diagram

Some of the key features of UNIX include:

1. Multiuser support: UNIX allows multiple users to simultaneously access the


same system and share resources.
2. Multitasking: UNIX is capable of running multiple processes at the same
time.
3. Shell scripting: UNIX provides a powerful scripting language that allows
users to automate tasks.
4. Security: UNIX has a robust security model that includes file permissions,
user accounts, and network security features.

Unix Commands

pwd (Print Working Directory): Shows the current directory you are in.
ls (List): Lists the files and directories in the current directory.
cd (Change Directory): Allows you to navigate to different directories.
Touch: Creates an empty file.
touch filename: Creates a file with the given name.
mkdir (Make Directory): Creates a new directory.
mkdir directory_name: Creates a directory with the specified name.
rm (Remove): Deletes files and directories.
rm filename: Deletes a file.
cp (Copy): Copies files or directories.
cp source destination: Copies the source file or directory to the destination.
mv (Move): Moves or renames files and directories.
mv source destination: Moves or renames the source to the destination.
cat (Concatenate): Displays the content of a file.
cat filename: Outputs the contents of the specified file.

Advantages of UNIX:

1. Stability: UNIX is known for its stability and reliability


2. Security: UNIX has a robust security model that includes file permissions, user accounts,
and network security features. This makes it a popular choice for systems that require high
levels of security.
3. Scalability: UNIX can be scaled up to handle large workloads and can be used on a variety
of hardware platforms.

Disadvantages of UNIX:

1. Complexity: UNIX can be complex and difficult to learn for users who are used to
graphical user interfaces (GUIs).
2. Cost: Some UNIX systems can be expensive, especially when compared to open-source
alternatives like Linux.

You might also like