OSY 2nd Unit Notes
OSY 2nd Unit Notes
1. Process Management
2. Device Management
3. File Management
4. Memory Management
5. Protection and Security
1] Process Management:
Service: Handles the creation, scheduling, and termination of processes.
Functions:
1. Process scheduling
2. Multi-tasking support
3. Inter-process communication (IPC)
2] Device Management:
Functions:
3] File Management:
Service: Provides a way to store, retrieve, and manage files on storage
devices.
Functions:
1. File creation, deletion, and manipulation
2. Directory management
3. Access control and permissions
4] Memory Management:
Service: Manages the system's memory resources.
Functions:
1. Allocation and deallocation of memory spaces
2. Virtual memory management
3. Paging and segmentation
Q.3] What is purpose of system call? State two system calls with their functions
OR
List and Explain the Types of System Call
System calls:
A system call is a mechanism that provides the interface between
a process and the operating system.
3] Device Management:
When a process is in running state, it requires several
resources to execute. These resources include main memory, disk drives, files and
so on. If the resource is available, it is assigned to the process. Once the resource
is allocated to the process, process can read, write and reposition the device.
Functions:
1. request device, release device
2. read, write, reposition
3. get device attributes, set device attributes
4. logically attach or detach devices
Examples:
• ioctl()
• read()
• write()
4] Information Maintenance:
Transferring information between the user
program and the operating system requires system call. System information
includes displaying current date and time, the number of current users, the version
number of the operating system, the amount of free memory or disk space and so
on. Operating system keeps information about all its processes that can be
accessed with system calls such as get process attributes and set process attributes.
Functions:
1. get time or date, set time or date
2. get system data, set system data
3. get process, file, or device attributes
4. set process, file, or device attributes
Examples:
• getpid()
• getuid()
• sleep()
• alarm()
• time()
5] Communication:
Processes in the system, communicate with each other.
Communication is done by using two models: message passing and shared
memory. For transferring messages, sender process connects itself to receiving
process by specifying receiving process name or identity. Once the
communication is over system close the connection between communicating
processes.
Functions:
1. create, delete communication connection
2. send, receive messages
3. transfer status information
4. attach or detach remote devices
Examples:
• pipe()
• shmget()
• msgget()
• semget()
Q.4] Enlist the operating system tools and explain.
Operating system tools:
1. User Management
2. Security policy
3. Device Management
4. Performance Monitor
5. Task Scheduler
1] User management:
User management tools are responsible for creating, modifying, and deleting
user accounts and managing user permissions and access levels.
1) Account Creation:
Creating a new user account in a Unix/Linux environment.
• Command: useradd
• Syntax: useradd [options] username
• Example: useradd sakshi
2) Setting Passwords:
Setting or changing the password for a user.
• Command: passwd
• Syntax: passwd username
• Example: passwd sakshi123
3) Account Deletion:
Removing a user account.
• Command: userdel
• Syntax: userdel [options] username
• Example: userdel sakshi
4) Viewing User Information:
Checking details of user accounts.
• Command: id
• Syntax: id username
• Example: id sakshi
Benefits of User Management Tools:
1. Security: Protects sensitive data by controlling access and enforcing
security policies.
2. Organization: Keeps user accounts and permissions well-organized,
making management easier.
3. Compliance: Helps meet regulatory requirements for user access and data
protection.
2] Security policy:
A security policy in an operating system defines the rules and
guidelines that govern the protection of system resources and data. It encompasses
user authentication, access control, data protection, and overall system security
measures.
1) User Authentication:
• Tool: PAM in Linux
• Purpose: Manages user authentication methods.
• Example Configuration File: /etc/pam.d/common-auth
• Syntax: auth required pam_unix.so
2) Access Control
• Tool: Access Control Lists (ACLs)
• Purpose: Provides more granular permissions for files and directories.
• Command: setfacl
• Syntax: setfacl -m u:username:rwx /path/to/file
3) Audit Logging
• Tool: Audit daemon
• Purpose: Monitors and logs system events for compliance and security.
• Configuration File: /etc/audit/audit.rules
• Syntax: -w /etc/passwd -p wa -k passwd_changes
Benefits of Security Policy Tools:
1. Enhanced Security: Protects sensitive data and systems from
unauthorized access.
2. User Accountability: Tracks user actions, helping to identify potential
security breaches.
3. Regulatory Compliance: Ensures adherence to legal and industry
standards for data protection.
3] Device Management:
Device management in an operating system (OS) involves controlling and
coordinating hardware devices, ensuring that they operate correctly and
efficiently. This includes managing device drivers, input/output operations, and
resource allocation for hardware components.
1) Device Drivers:
Device drivers are specialized software that allow the OS to
communicate with hardware devices.
• Example: A printer driver enables the OS to send print jobs to a printer.
• Usage:
In Linux, drivers are often loaded as kernel modules.
• Command: modprobe printer_driver
2) Device Configuration:
Device management tools help configure hardware
settings and parameters.
• Example: Configuring network interfaces.
• Command: ifconfig
• Example: ifconfig eth0 up
3) Input/Output Management:
Manages the data transfer between devices and
the OS.
• Example: Mounting a USB drive.
• Command: mount
• Example: mount /dev/sdb1 /mnt/usb
4) Error Handling:
Device management tools monitor devices for errors and
handle them appropriately.
• Example: Checking device logs for errors.
• Command: dmesg
• Example: dmesg | grep error
Benefits of Device Management Tools:
• Streamlined Device Setup: Simplifies the installation process for new
hardware.
• Troubleshooting Efficiency: Provides tools to quickly diagnose and fix
hardware-related issues.
• Resource Management: Helps in efficiently managing system resources
among various devices.
4] Performance Monitor:
A performance monitor is a tool that helps
administrators track and analyse the performance of system resources, such as
CPU, memory, disk usage, and network activity. By monitoring these metrics,
administrators can identify bottlenecks, optimize resource usage, and maintain
overall system health.