Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
1.1.
Operating System
2.
What is Protection in Operating System?
2.1.
Why is it important?
2.2.
Need of protection OS
2.3.
Goals of Protection
2.4.
What is the domain of protection?
3.
Association between process and domain
4.
Security measures of Operating System
4.1.
Authentication
5.
Components of protection in an operating system
6.
Frequently Asked Questions
6.1.
What are the main goals of OS?
6.2.
What is an operating system's main purpose?
6.3.
What does a real-time system entail? 
6.4.
What purpose does paging serve in an operating system?
6.5.
Are there any other Data Structures and Algorithms content in Coding Ninjas Studio?
7.
Conclusion
Last Updated: May 25, 2024
Easy

Protection in Operating System

Author Saksham Gupta
0 upvote
Create a resume that lands you SDE interviews at MAANG
Speaker
Anubhav Sinha
SDE-2 @
12 Jun, 2024 @ 01:30 PM

Introduction

Operating System forms the backbone of any coding interview. Thus it's very important to have a good grasp of this topic. But don't you worry about any of it. Ninjas are here for you, and today we will be going to discuss ‘Protection in Operating System.’ 

Operating System

Also Read About, FCFS Scheduling Algorithm, Multiprogramming vs Multitasking

Operating System

An operating system (OS) is the program that manages all of the other application programs in a computer after being loaded into it by a boot program. The operating system is accessed by application programs via a defined application program interface, which makes requests for services (API). Users can also interact with the operating system directly using a user interface, such as a command-line interface (CLI) or a graphical user interface (GUI) (GUI).
Want to know about Components of Operating System check this out. 

What is Protection in Operating System?

When several users share computer resources such as CPU, memory, and other resources, security is more crucial. It is the job of the operating system to provide a mechanism that protects each process from other processes. All assets that require protection in a multiuser environment are categorized as objects, and individuals who seek to access these things are referred to as subjects. Distinct 'access privileges are granted to different subjects by the operating system.

Protection is a method that limits the access of programs, processes, or users to the resources defined by a computer system. Protection can be used to allow several users to safely share a common logical namespace, such as a directory or files, in multi-programming operating systems. It necessitates the safeguarding of computer resources such as software, memory, and processors. As assistance to multiprogramming OS, users should apply protective steps so that several users can safely access a common logical namespace like a directory or data. Maintaining secrecy, honesty, and availability in the OS might provide protection. The device must be protected against unauthorized access, viruses, worms, and other malware.
 

Must Read Process Management in OS

Why is it important?

  • There could be security issues such as illegal reading, writing, or modification, or the system failing to function properly for authorized users.
  • It helps protect data, processes, and programs from the unauthorized user or program access.
  • It is critical to guarantee that there are no breaches in access permissions, malware, or illegal access to existing data.
  • Its goal is to ensure that only the policies of the systems have access to programs, resources, and data.

Need of protection OS

  • Isolation: Protection OS ensures isolation between different processes and users, preventing unauthorized access to resources.
  • Security: It protects system resources, such as memory and files, from unauthorized access, modification, or corruption.
  • Stability: Protection OS enhances system stability by preventing one process from interfering with or crashing other processes.
  • Fairness: It ensures fair resource allocation among competing processes, preventing one process from monopolizing system resources.

Goals of Protection

Protection mechanisms in an operating system serve several goals:

  • Confidentiality: Ensuring that sensitive information is accessible only to authorized users or processes.
  • Integrity: Guaranteeing that data remains unaltered and trustworthy throughout its lifecycle.
  • Availability: Ensuring that resources and services are available and accessible to authorized users when needed.
  • Isolation: Preventing interference and unauthorized access between different processes, users, or components.
  • Auditability: Providing mechanisms for tracking and monitoring system activities to detect and investigate security incidents or violations.

What is the domain of protection?

The following are the various realms of protection in an operating system:

  • The access to each process' resource handling is restricted by the protection policies. A process is required to use only the resources required to do its task within the time restrictions and in the mode required. It is the protected domain of a process.
  • In a computer system, processes and objects are abstract data types with operations that are exclusive to them. A domain component has the following definition: <object, {set of operations on object}>.
  • Each domain contains a set of objects as well as the actions that can be performed on them. Only one process, operation, or user can make up a domain. If a procedure is linked to a domain, altering the domain means that changing the procedure ID is necessary. One or more common procedures may be shared among objects.

Must Read Multiprocessing Operating System and Open Source Operating System

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Association between process and domain

In computer security, the association between a process and a domain is a fundamental concept. A domain represents a set of access rights or permissions associated with an entity, such as a user or a process. Processes are typically associated with a specific domain or security context, which determines their access privileges to system resources. This association ensures that processes can only access resources for which they have been authorized, helping to enforce security policies and prevent unauthorized access or malicious actions. By controlling the association between processes and domains, operating systems can effectively manage resource access and maintain system security.

Security measures of Operating System

Users can utilize the operating system's security features to their advantage. Here are a few examples:

  • At all times, the network utilized for file transfers must be secure. No alien software should be able to harvest data from the network during the transfer. Network sniffing is what it's called, and it may be avoided by using encrypted data transfer routes. Furthermore, the OS should be able to withstand intentional or unintentional infringement.
  • Passwords are a good way of authentication, but they are also the most common and susceptible. Passwords are very easy to crack.
  • No one is allowed on the premises or has access to the systems, among other security precautions implemented at various levels. To gain access to the system, the best authentication options include a username-password combination, ocular retina scan, fingerprint, or even user cards.

Authentication

To build a strong password and a formidable authentication source, one-time passwords, encrypted passwords, and cryptography are employed.

  1. Single-use password : 
    It is a method that is distinct for each user login. It is a combination of two passwords that grant access to the user. The system generates a random number, which the user must match. For the system and the user, an algorithm generates a random number, and the output is matched using a common function.
     
  2. Secure Passwords:
    It is also a very effective method of access authentication. Encrypted data is sent over the network, which transfers and verifies passwords, allowing data to transit without being intercepted.
     
  3. Cryptography:
    It's yet another approach to prevent unwanted users from accessing data sent over a network. It facilitates the secure transfer of data. It introduces the concept of a key for data protection. In this circumstance, the key is critical. When a user sends data, he encodes it using a computer key, which must be decoded by the receiver using the same key. As a result, even if the data is stolen throughout the process, the unauthorized user is unlikely to get access to it.

Components of protection in an operating system

1. Access Control:

  • Determines who can access what resources and under what conditions.
  • Enforced through authentication, authorization, and auditing mechanisms.

2. Isolation:

  • Ensures that processes and resources are separated to prevent interference and unauthorized access.
  • Implemented through memory protection, virtualization, and sandboxing techniques.

3. Resource Management:

  • Manages the allocation and usage of system resources such as CPU, memory, and I/O devices.
  • Enforces fairness and prevents resource starvation through scheduling algorithms and quotas.

4. Authentication:

  • Verifies the identity of users and processes before granting access to resources.
  • Uses credentials such as passwords, digital certificates, or biometric data for authentication.

5. Encryption:

  • Protects data from unauthorized access or interception by encrypting it using cryptographic algorithms.
  • Ensures confidentiality and integrity of data during storage, transmission, and processing.

6. Auditing:

  • Monitors and logs system activities to track user actions, detect security violations, and investigate incidents.
  • Provides accountability and helps in forensic analysis and compliance auditing.

You can also read about layered structure of operating system and Batch Operating System.

Frequently Asked Questions

What are the main goals of OS?

The main goals of an operating system are resource management, abstraction, protection, concurrency, fault tolerance, and providing a user-friendly interface for interaction.

What is an operating system's main purpose?

An operating system serves two primary functions:

Its goal is to keep a computer system running smoothly by monitoring and managing its computational activities.

It provides a setting for program development and implementation.

What does a real-time system entail

When the operation of a processor is subjected to strict time constraints, a real-time system is utilized. It has well-defined and well-defined temporal limits.

What purpose does paging serve in an operating system?

In an operating system, paging is employed to solve the problem of external fragmentation. This method ensures that the information you require is provided as soon as feasible.

Are there any other Data Structures and Algorithms content in Coding Ninjas Studio?

Yes, Coding Ninjas Studio lets you practice coding while also answering common interview questions. The more we practice, the more probable we will land a job at our ideal firm.

Conclusion

In this article, we have extensively discussed the ‘Protection in Operating System'. Protection mechanisms are essential components of modern operating systems, ensuring the security, integrity, and reliability of computer systems. By implementing access controls, isolation, resource management, authentication, encryption, and auditing, operating systems can effectively protect against unauthorized access, interference, and system failures.

Recommended Readings: 


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, DBMS, System Design, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Live masterclass