0% found this document useful (0 votes)
22 views12 pages

OSC10

Uploaded by

bipruu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views12 pages

OSC10

Uploaded by

bipruu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Case Studies-The Linux System

1. Mention the features of operating system.

A: Features of operating system are:-

1. Process Management: The OS handles the creation, scheduling, and termination


of processes. It ensures that each process gets the necessary resources and
manages process synchronization and communication to avoid conflicts.
2. Memory Management: The OS manages the computer's memory, allocating space
for processes and ensuring efficient memory use. This includes virtual memory,
paging, and segmentation to optimize performance.
3. File System Management: The OS provides a way to store, organize, and manage
files on storage devices. It manages directories, file access permissions, file
organization, and file operations like creation, deletion, and modification.
4. Device Management: The OS acts as an intermediary between the hardware
devices (e.g., printers, hard drives, keyboards) and software applications. It
controls and coordinates input/output (I/O) operations and ensures smooth device
communication via drivers.
5. Security and Access Control: The OS ensures that unauthorized users do not gain
access to system resources. It implements user authentication (like passwords)
and access control mechanisms (such as file permissions) to protect sensitive
data.
6. User Interface (UI): The OS provides an interface for users to interact with the
computer, whether through a graphical user interface (GUI) or a command-line
interface (CLI). It enables users to run programs, manage files, and configure
settings.
7. Multitasking and Multiuser Support: Most modern OSs support multitasking,
allowing multiple processes to run concurrently. They also enable multiple users to
access the system simultaneously in multiuser environments, such as on servers or
mainframes.
8. Networking: The OS includes networking features to allow computers to
communicate over local or wide-area networks. It supports protocols like TCP/IP for
internet connectivity, file sharing, and remote access.

2. Write a note on the evolution of the Linux operating system

A: In the early 1990s, home PCs became powerful enough to run UNIX, inspiring Linus
Torvalds, a Computer Science student at the University of Helsinki, to create a free version
of UNIX. He started coding and sought help from others, aiming to build a completely free
and compliant UNIX system. While hardware support was a challenge, new drivers were
constantly developed, and Linux (as it became known) gradually supported more hardware.
Initially, 95% of Linux was written in C and 2.8% in Assembly. Within two years, there were
12,000 Linux users. The project, popular among hobbyists, grew steadily and adhered to
the POSIX standard. Over the next few years, Linux added all the features of UNIX,
becoming a full UNIX clone suitable for workstations and servers. Today, Linux has many
variations and is widely used in different computing environments.

3. What are the Some of the popular Linux distributions, in the Servers category,

A: Some of the popular Linux distributions, in the Servers category, include: CeLinu, Red
Hat Enterprise Linux (RHEL), Ubuntu Server, SUSE Enterprise Linux

4. Explain the multiuser capability of the Linux operating system.

A: This is a capability of Linux OS where, the same computer resources- hard disk,
memory, etc. are accessible to multiple users. A terminal will consist of at least a
Monitor/VDU, keyboard and mouse as input devices. All the terminals are then connected
to the main Linux Server or Host Machine, whose resources and connected peripheral
devices such as printer, can be used. Client/Server Architecture is an example of multi user
capability of Linux, where different clients are connected to a Linux server. The client sends
request to the server with a particular data and server requests with the processed data or
the file requested, client terminal is also known as a Dumb Terminal.

5. How is Linux operating system advantageous for multitasking and portability.


A: Multitasking: Linux has the ability to handle more than one job at a time, Say for
example you have executed a command for sorting for a huge list and Simultaneously
typing in a notepad. This is managed by dividing the CPU time intelligently by the
implementation of scheduling policies and the concept of context switching.

Portability: Portability was the one of the main features that made Linux so popular among
the users, but portability doesn't mean that it is smaller in file size and can be carried on
pen drive, CDs and memory cards. Instead, here portability means that Linux OS and its
application can work on different types of hardware’s in the same way. Linux kernel and
application programs support their installation even on very least hardware configuration.

6. What are the three main security concepts provided by Linux.

A: Authentication: This simply implies claiming the person whom you are by assigning
passwords and login names to individual users, ensuring that nobody can gain access to
their work.

Authorization: At the file level, Linux has authorization limits to users. There are read, write
and execute permissions for each file which decide who can access a particular file, who
can modify it and who can execute it.

Encryption: This feature encodes our files into an unreadable format that is also known as
“cypher text", so that even if someone succeeds in opening it your secrets will be safe.

Communication: Linux has an excellent feature for communicating with the fellow users: it
can be within the network of a single main computer, or between two or more computer
networks. The users can easily exchange mail, data, program through such networks.

7. List out the advantages of Linux operating system

A: There are several advantages of LINUX operating system. Some of them are as follows:

• Low cost: There s no need to spend time and huge amount money to obtain
licenses.
• Stability: Linux has high stability compared with other operating systems. There is no
need to reboot the Linux system t maintain performance levels. Rarely it freeze up or
slowdown. It has a continuous up-time of hundreds of days or more..
• Performance: Linux provides high performance on various networks. It has the
ability to handle large numbers of users simultaneously.
• Networking: Linux provides a strong support for network functionality; client and
server systems can be easily setup on any computer running Linux. It can perform
tasks like network backup faster than other operating systems.
• Flexibility: Linux is very flexible. Linux can be used for high performance server
applications, desktop applications, and embedded systems. You can install only the
needed components for a particular use. You can also restrict the use of specific
computers.
• Compatibility: It runs all common Unix software packages and can process all
common file formats.
• Wider Choice: There is a large number of Linux distributions which gives you a wider
choice. Each organization develop and support different distribution. You can pick
the one you like best; the core functions are the same.
• Fast and easy installation: Linux distributions come with user-friendly installation.
• Better use of hard disk: Linux uses its resources well enough even when the hard
disk is almost full.
• Multitasking: Linux is a multi tasking operating system. It can handle many things at
the same time.
• Security: Linux is one of the most secure operating systems. File ownership and
permissions make Linux more secure.
• Open Source: Linux is an Open source operating systems. You can easily get the
source code for Linux and edit it to develop your personal operating system.

8. What is a Linux kernel.

A: The Linux kernel is the main component of a Linux OS. This is the core interface between
a computer's hardware and its processes. It communicates between the two, managing
resources as efficiently as possible. The kernel is so named because-like a seed inside a
hard-shell it exists within the OS and controls all major functions of the hardware, whether
it's a phone, laptop, server, or any other kind of computer. To put the kernel in context, one
can think of a Linux system having four layers as shown in Fig.

Hardware: The physical parts of a computer (CPU, RAM, storage, etc.) where the CPU
performs tasks and interacts with memory.
Linux Kernel: The core software that controls the CPU and hardware.

Shell: Acts as a middleman between the user and the kernel, sending commands and
displaying results.

Applications/User Processes: Programs running on the system, managed by the kernel,


and can communicate with each other.

Execution Modes: The CPU operates in kernel mode (full access to hardware) and user
mode (restricted access), with separate kernel and user memory spaces.

9. With a diagram explain the kernel architecture of Linux.

A: The kernel is the core part of the Linux OS that manages system resources like CPU
time, memory, and devices when multiple programs run. It has four main jobs:

• Memory Management: Tracks memory usage and where data is stored.


• Process Management: Decides which processes use the CPU and for how long.
• Device Drivers: Acts as a bridge between hardware and software.
• System Calls & Security: Handles requests from programs and ensures security.

The kernel works in kernel space and is invisible to users. Programs run in user space and
communicate with the kernel through system calls. If a user process crashes, it usually
won’t affect the system, but a kernel crash can crash the whole system.

The following is the fundamental architecture of Linux given in Fig

•User Space is where all user programs run. It can't directly access memory or hardware;
it must go through the kernel. Programs in user space can only access memory via system
calls. If a program crashes in user space, it can be recovered. The GNU C library helps
switch from user space to kernel space when needed.

•Kernel Space is where the core parts of the OS run. It has full access to memory and
hardware like RAM and disks. It manages key tasks like file handling, memory, processes,
and more. Kernel space includes the system call interface, which allows programs in user
space to communicate with the kernel. The kernel works across different hardware types
(like Intel or ARM) and manages resources, scheduling, and handling interrupts.

10. Define user space and kernel space.

A: •User Space is where all user programs run. It can't directly access memory or
hardware; it must go through the kernel. Programs in user space can only access memory
via system calls. If a program crashes in user space, it can be recovered. The GNU C library
helps switch from user space to kernel space when needed.

•Kernel Space is where the core parts of the OS run. It has full access to memory and
hardware like RAM and disks. It manages key tasks like file handling, memory, processes,
and more. Kernel space includes the system call interface, which allows programs in user
space to communicate with the kernel. The kernel works across different hardware types
(like Intel or ARM) and manages resources, scheduling, and handling interrupts.

11. Briefly explain the states of a process in Linux operating system.

A: In simple terms, Linux processes go through various states:

• RUNNING: The process is either running or waiting to run.


• INTERRUPTIBLE: The process is sleeping, waiting for something to wake it up, like
an interrupt or signal.
• UN-INTERRUPTIBLE: The process is sleeping but can't be woken up by signals.
• STOPPED: The process is paused, usually due to a signal like SIGSTOP.
• TRACED: The process is being debugged.
• ZOMBIE: The process has finished but still exists in the system because the parent
hasn't read its termination status.
• DEAD: The process is fully terminated and removed from the system after the parent
fetches its status.

12. Write a note on Linux threads.


A: In Linux, threads are the smallest units of work within a program. A program can be
single-threaded (one task at a time) or multi-threaded (multiple tasks running at once).
Multiple threads in a program share the same memory and resources, which makes them
more efficient than separate processes. In the kernel, Linux calls these threads Light
Weight Processes (LWPs) because they are treated like separate processes but are much
lighter in terms of resource usage. Threads in a program can run independently, but they
share the same address space and resources like open files. Threads in Linux are created
using the pthread library, which provides a way to manage threads. Internally, Linux uses a
system call called clone() to create both regular processes and threads, but the difference
comes from how the clone() function is used to manage shared resources.

13. Briefly explain the light weight processes in Linux.

A: In Linux, Light Weight Processes (LWPs) refer to threads that are treated as individual
processes by the kernel. Although they appear as separate processes, LWPs share the
same memory space and resources, such as open files, with other threads in the same
program. This sharing of resources makes LWPs more efficient than regular processes, as
they require fewer system resources to manage. LWPs were introduced to allow the kernel
to manage threads more effectively. In earlier versions of Linux, threads were managed at
the user level, meaning the kernel viewed them as a single process. However, with modern
implementations, each thread is viewed as a separate LWP by the kernel, allowing better
multitasking and resource management. The key feature of LWPs is that they share the
same address space and resources, but can execute independently, allowing for better
parallelism and performance in multi-core systems. They are created using the clone()
system call, which allows fine control over what resources are shared between the LWP
and the parent process.

14. Explain in detail about the process management in Linux.

• A: Process Creation: New processes are created with fork(), and the child process
can use exec() to run a different program.
• Process States: Processes can be running, blocked (waiting for resources),
stopped, or in a zombie state (finished but not fully cleaned up).
• Process Scheduling: Linux uses a preemptive scheduler to allocate CPU time
fairly among processes, using the CFS for normal tasks and special scheduling for
real-time tasks.
• Process Termination: Processes end when they finish or are killed, and the kernel
cleans up resources after termination.
• Process Control and Signals: Signals like SIGKILL or SIGSTOP are used to control
processes.
• Process Hierarchy: Processes are organized in a tree, with init (PID 1) as the root.
• Thread Management: Threads are smaller units within processes, sharing memory
but executing separately.
• Resource Management: The kernel allocates memory, CPU, and file descriptors to
processes while ensuring isolation and fairness.

15. How are threads different from light weight process in Linux.

16. With a neat diagram explain the memory management in Linux operating system.

A: The major part of the computer is CPU of which RAM is the frontal part of the CPU. All
data items processed at CPU has to go through RAM. A process, which needs to be
processed, will first be loaded in RAM and the CPU will get process data from RAM.
In a Linux system, memory management is optimized with the use of multiple levels of
cache (L1, L2, L3) in the CPU. These caches are small but fast, helping speed up
processing. When a program needs data, it’s first copied from RAM into CPU registers and
cached to speed up access. When data is requested from the hard disk, it’s first loaded
into RAM and stored in the page cache, which keeps recently accessed data to make
future requests faster. If the data is modified, it stays in RAM until it’s eventually written
back to the hard disk, but not immediately—this is to reduce frequent disk writes. The
concept of dirty cache helps optimize disk writes by buffering data in RAM before writing it
to disk. In short, using RAM efficiently is crucial for good performance and smooth
operation in Linux.

17. Illustrate the working of Linux file system.

A: The Linux file system is designed to manage and store data efficiently on a computer. It
organizes data into files and directories in a hierarchical structure. Below is a simple
explanation of how the Linux file system works:

1. Root Directory ("/"): The Linux file system starts with a single root directory
denoted as "/". All files and directories are organized under this root in a tree-like
structure.
2. Hierarchical Structure: Linux uses a tree structure where each directory can have
subdirectories and files. This makes it easier to manage large amounts of data.
3. Files and Directories: Files are the basic unit of data storage, and directories are
used to organize files. For example, /home is a directory that contains user data,
and /etc stores system configuration files.
4. Inodes: Each file and directory in Linux is represented by an inode, which contains
metadata about the file, like its size, permissions, ownership, and location on disk.
Inodes don’t store the file name but store information about the file's contents.
5. File Permissions: Linux uses file permissions to control access to files. There are
three types of permissions: read (r), write (w), and execute (x), which can be set for
the file owner, group, and others.
6. Mounting: The file system supports multiple storage devices, such as hard drives or
USBs. These devices are mounted (attached) to specific directories in the file
system, allowing access to their files. For example, a secondary disk might be
mounted under /mnt.
7. File Types: Linux supports different types of files like regular files, directories,
symbolic links (shortcuts), device files (representing hardware), and special files
used for communication (e.g., pipes).
8. File System Types: Linux supports various file systems like ext4, xfs, and btrfs,
each with its own structure and features. The file system type determines how data
is stored and accessed on disk.
18. Write a note on different directory types in Linux and types of files stored in them.

A: (i) Linux binary directory: In Linux, the binary directory structure contains important
folders for executable files:

• /bin: Stores basic user commands and essential binaries for single-user mode, like
cat, cp, ls, etc.
• /sbin: Contains system binaries used for system maintenance, requiring root
privileges, like fsck, init, ifconfig.
• /lib: Holds shared libraries and kernel modules used by binaries in /bin and /sbin.
• /opt: Used for optional software packages or add-ons from third-party vendors.

(ii) Linux Configuration Directory: The configuration directory holds files that set up
parameters and settings for programs:

• /boot: Contains essential files needed to boot the system, like boot loader files and
the boot menu (e.g., /boot/grub).
• /etc: Stores system configuration files, including settings for programs, startup, and
shutdown scripts. All files here are text-based.

(iii) Linux Data Directory: The data directory stores system data:

• /home: Holds personal files for users, with subdirectories like Desktop,
Documents, etc.
• /root: The home directory for the root user (administrator), separate from the
system root.
• /srv: Stores data for services like web servers (e.g., www, ftp).
• /media: Used for mounting removable devices like USB drives, CDs, etc.
• /mnt: Reserved for temporary mounting of file systems by administrators.
• /tmp: Stores temporary files, which are deleted after a reboot; not for important
data.

19. Explain in detail about any two security feature implemented in Linux operating
system.

A: OS Management: Linux uses package management tools to install, update, and


manage software from repositories. These tools ensure you have the correct version of
software, and they check for updates and security vulnerabilities. Repositories help
download authentic and correct packages, and tools can automatically update outdated
software.

Backup and System Recovery: To recover from system failures or compromises, backup
tools are used to restore system files and configurations. Effective backups should allow
you to restore files from different points in time. Linux distributions offer various backup
tools, but the administrator must set up the backup process. For their systems.

20. What are the different types of file permission in Linux operating system.

A: Every file and directory on a Linux is marked with three sets of file permissions that
determine how it may be accessed, and by whom:

• The permissions for the owner, the specific account that is responsible for the file.
• The permissions for the group that may use the file.
• The permissions that apply to all other accounts.
• Each set may have none or more of the following permissions on the item- read,
write and execute.

A user may only run a program file if they belong to a set that has the execute permission.
For directories, the execute permission indicates that users in the relevant set may see the
files within it, although they may not actually read, write or execute any file unless the
permissions of that file permit it. Executable files with the set UID property automatically
run with the privileges of the file owner, rather than the account that activates them. Avoid
setting the execute permission or set UID on any file or directory unless you specifically
require it. The root account has full access to every file on the system, regardless of the
permissions attached to that file.

21. Write in detail about backup and system recovery in Linux.

A: You may easily restore program files for all of the software that is included with your
distribution with the software management tools. In order to fully recover a system from
accident, or deliberate compromise, you must also have access to copies of the data,
configuration, and log files. These files require some form of separate backup mechanism.

All effective backup systems provide the ability to restore versions of your files from several
earlier points in time. You may discover that the current system is damaged or
compromised at any time, and need to revert to previous versions of key files, so keeping
only one additional copy of a key file should not be considered an adequate backup.
Majority of the Linux distributions provide a wide range of backup tools, and leave it to the
administrator to configure a suitable backup arrangement for their systems.
22. Explain in detail about security feature implemented in Linux operating system.

A: Linux has several built-in security features to protect users and the system:

1. User Accounts & Authentication: Linux uses unique usernames and passwords to
control access. Sudo lets users perform admin tasks without logging in as root,
reducing security risks.
2. File Permissions: Files have read, write, and execute permissions for the owner,
group, and others. Special permissions like SetUID and Sticky Bit help control
access further.
3. Data Verification: Linux uses checksums and digital signatures to verify the
integrity of files and software, ensuring they haven’t been tampered with.
4. Encrypted Storage: Tools like LUKS and eCryptfs encrypt files or entire disks to
protect sensitive data. Secure Boot and TPM help prevent malware from loading
during startup.
5. OS Management: Linux package managers update software and ensure it’s secure.
SELinux adds an extra layer of security by controlling how programs access system
resources.
6. Remote Access Security: SSH provides secure remote access, while firewalls
(iptables) control network traffic to block unauthorized connections.
7. Application Isolation: Tools like Docker and SELinux isolate applications to limit
their impact on the system.
8. Protection Against Malware: Linux uses antivirus tools (like ClamAV) and rootkit
detectors to protect against malware and unauthorized system changes.
9. Monitoring & Auditing: System logs and audit tools track activity, helping admins
detect and investigate security issues.
10. Backup & Recovery: Regular backups using tools like rsync and Timeshift ensure
data can be restored after a system failure. Recovery mode and snapshots help
quickly fix or roll back systems.

You might also like