The Wayback Machine - https://web.archive.org/web/20240926170157/https://www.geeksforgeeks.org/resource-management-in-operating-system/
Open In App

Resource Management in Operating System

Last Updated : 25 Jun, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Resource Management in Operating System is the process to manage all  the resources efficiently like CPU, memory, input/output devices, and other hardware resources among the various programs and processes running in the computer.

Resource management is an important thing because resources of a computer are limited and multiple processes or users may require access to the same resources like CPU, memory etc. at the same time. The operating system has to manage and ensure that all processes get the resources they need to execute, without any problems like deadlocks.

Here are some Terminologies related to the resource management in OS:

  • Resource Allocation: This terms defines the process of assigning the available resources to processes in the operating system. This can be done dynamically or statically.
  • Resource: Resource can be anything that can be assigned dynamically or statically in the operating system. Example may include CPU time, memory, disk space, and network bandwidth etc.
  • Resource Management: It refers to how to manage resources efficiently between different processes.
  • Process: Process refers to any program or application that is being executed in the operating system and has its own memory space, execution state, and set of system resources.
  • Scheduling: It is the process of  determining from multiple number of processes which process should be allocated a particular resource at a given time.
  • Deadlock: When two or more processes are waiting for some resource but resources are busy somewhere else and resources are also waiting for some process to complete their execution . In such condition neither resources will be freed nor process would get it and this situation is called deadlock.
  • Semaphore: It is the method or tool which is used to prevent race condition. Semaphore is an integer variable which is used in mutual exclusive manner by various concurrent cooperative process in order to achieve synchronization.
  • Mutual Exclusion: It is the technique to prevent multiple number of process to access the same resources simultaneously.
  • Memory Management: Memory management is a method used in the operating systems to manage operations between main memory and disk during process execution.

Features or characteristics of the Resource management of operating system:

  • Resource scheduling: The OS allocate available resources to the processes. It decides the sequence of which process will get access to the CPU, memory, and other resources at any given time.
  • Resource Monitoring: The operating system monitors which resources is used by which process and also take action if any process takes many resources at the same time causing into deadlock.
  • Resource Protection:  The OS protects the system from unauthorized or fake access by the user or any other process.
  • Resource Sharing: The operating system permits many processes like memory and I/O devices to share resources. It guarantees that common resources are utilized in a fair and productive way.
  • Deadlock prevention: The OS prevents deadlock and also ensure that no process is holding resources indefinitely . For that it uses techniques likes resource preemption.
  • Resource accounting: The operating system always tracks the use of resources by different processes for allocation and statistical purposes.
  • Performance optimization: The OS optimizes resources distribution , the reason is to increase the system performance. For that many techniques like  load balancing and memory management are followed that ensures efficient resources distribution.

Diagrammatically representation of the Resource management : 

 



Similar Reads

Resource Allocation Graph (RAG) in Operating System
As Banker's algorithm using some kind of table like allocation, request, available all that thing to understand what is the state of the system. Similarly, if you want to understand the state of the system instead of using those table, actually tables are very easy to represent and understand it, but then still you could even represent the same inf
5 min read
Swap-Space Management in Operating system
Swapping is a memory management technique used in multi-programming to increase the number of processes sharing the CPU. It is a technique of removing a process from the main memory and storing it into secondary memory, and then bringing it back into the main memory for continued execution. This action of moving a process out from main memory to se
6 min read
Best Ways for Operating System Memory Management
Prerequisite - Partition Allocation Methods Contiguous Memory Allocation :Probably the least difficult technique for the memory portion is to isolate memory into a few fixed partitions. Each partition contains precisely one process. The level of multi-programming relies upon the number of partitions. In the different partition technique, when a par
7 min read
Memory Management in Operating System
The term memory can be defined as a collection of data in a specific format. It is used to store instructions and process data. The memory comprises a large array or group of words or bytes, each with its own location. The primary purpose of a computer system is to execute programs. These programs, along with the information they access, should be
14 min read
Tertiary Device Management in Operating System
As we know about tertiary devices, let us now dive deeper into OS support which is required to manage tertiary devices. The operating system provides support to tertiary storage devices as removable media. It involves the transfer of data between different systems. In order to manage the tertiary devices, the OS must have support for the device. Th
2 min read
Device Management in Operating System
The process of implementation, operation, and maintenance of a device by an operating system is called device management. When we use computers we will have various devices connected to our system like mouse, keyboard, scanner, printer, and pen drives. So all these are the devices and the operating system acts as an interface that allows the users
9 min read
Disk Management in Operating System
Disk management is one of the critical operations carried out by the operating system. It deals with organizing the data stored on the secondary storage devices which includes the hard disk drives and the solid-state drives. It also carries out the function of optimizing the data and making sure that the data is safe by implementing various disk ma
8 min read
Free Space Management in Operating System
Free space management is a critical aspect of operating systems as it involves managing the available storage space on the hard disk or other secondary storage devices. The operating system uses various techniques to manage free space and optimize the use of storage devices. Here are some of the commonly used free space management techniques: Free
7 min read
System Protection in Operating System
Introduction: System protection in an operating system refers to the mechanisms implemented by the operating system to ensure the security and integrity of the system. System protection involves various techniques to prevent unauthorized access, misuse, or modification of the operating system and its resources. There are several ways in which an op
3 min read
User View Vs Hardware View Vs System View of Operating System
User View of Operating System: The Operating System is an interface, hides the details which must be performed and present a virtual machine to the user that makes it easier to use. Operating System provides the following services to the user. Execution of a programAccess to I/O devicesControlled access to filesError detection (Hardware failures, a
1 min read
Xv6 Operating System -adding a new system call
Prerequisite - Xv6 Operating System -add a user program In last post we got to know how to add user program in Xv6 Operating System. Now here you will see how to add new system call in Xv6 Operating System. A dding new system call to xv6: A system call is way for programs to interact with operating system. A computer program makes system call when
6 min read
Traps and System Calls in Operating System (OS)
Traps and system calls are two mechanisms used by an operating system (OS) to perform privileged operations and interact with user-level programs. Here is an overview of each mechanism: Traps: A trap is an interrupt generated by the CPU when a user-level program attempts to execute a privileged instruction or encounters an error. When a trap occurs
3 min read
Fork System Call in Operating System
In many operating systems, the fork system call is an essential operation. The fork system call allows the creation of a new process. When a process calls the fork(), it duplicates itself, resulting in two processes running at the same time. The new process that is created is called a child process. It is a copy of the parent process. The fork syst
5 min read
System Programs in Operating System
System Programming can be defined as the act of building Systems Software using System Programming Languages. According to Computer Hierarchy, Hardware comes first then is Operating System, System Programs, and finally Application Programs. Program Development and Execution can be done conveniently in System Programs. Some of the System Programs ar
3 min read
File System Implementation in Operating System
A file is a collection of related information. The file system resides on secondary storage and provides efficient and convenient access to the disk by allowing data to be stored, located, and retrieved. File system implementation in an operating system refers to how the file system manages the storage and retrieval of data on a physical storage de
11 min read
Difference between System Software and Operating System
Software is like a set of instructions that tell a computer what to do. There are two main types application software and system software. Application software is extra programs you can add to your computer to do specific things, like write documents or play games. You don't need these to use your computer, but they help you do particular tasks. Sy
5 min read
Operating Systems | Memory Management | Question 1
Which of the following page replacement algorithms suffers from Belady’s anomaly? (A) FIFO (B) LRU (C) Optimal Page Replacement (D) Both LRU and FIFO Answer: (A) Explanation: Belady’s anomaly proves that it is possible to have more page faults when increasing the number of page frames while using the First in First Out (FIFO) page replacement algor
1 min read
Operating Systems | Memory Management | Question 2
What is the swap space in the disk used for? (A) Saving temporary html pages (B) Saving process data (C) Storing the super-block (D) Storing device drivers Answer: (B) Explanation: Swap space is typically used to store process data. See this for more details.
1 min read
Operating Systems | Memory Management | Question 10
Increasing the RAM of a computer typically improves performance because: (A) Virtual memory increases (B) Larger RAMs are faster (C) Fewer page faults occur (D) Fewer segmentation faults occur Answer: (C) Explanation: When there is more RAM, there would be more mapped virtual pages in physical memory, hence fewer page faults. A page fault causes pe
1 min read
Operating Systems | Process Management | Question 6
Consider the following code fragment: if (fork() == 0) { a = a + 5; printf("%d,%d\n", a, &a); } else { a = a –5; printf("%d, %d\n", a, &a); } Let u, v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE? (A) u = x + 10 and v = y (B) u = x +
2 min read
Operating Systems | Memory Management | Question 4
A computer system supports 32-bit virtual addresses as well as 32-bit physical addresses. Since the virtual address space is of the same size as the physical address space, the operating system designers decide to get rid of the virtual memory entirely. Which one of the following is true? (A) Efficient implementation of multi-user support is no lon
1 min read
Operating Systems | Memory Management | Question 5
A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is: (A) 11 bits (B) 13 bits (C) 15 bits (D) 20 bits Answer: (C) Explanation: Size of a page = 4KB = 2^12 Total number
1 min read
Operating Systems | Memory Management | Question 6
Virtual memory is (A) Large secondary memory (B) Large main memory (C) Illusion of large main memory (D) None of the above Answer: (C) Explanation: Virtual memory is illusion of large main memory.
1 min read
Operating Systems | Memory Management | Question 10
Page fault occurs when (A) When a requested page is in memory (B) When a requested page is not in memory (C) When a page is corrupted (D) When an exception is thrown Answer: (B)Explanation: Page fault occurs when a requested page is mapped in virtual address space but not present in memory. Quiz of this QuestionPlease comment below if you find anyt
1 min read
Operating Systems | Memory Management | Question 8
Thrashing occurs when (A) When a page fault occurs (B) Processes on system frequently access pages not memory (C) Processes on system are in running state (D) Processes on system are in waiting state Answer: (B) Explanation: Thrashing occurs processes on system require more memory than it has. If processes do not have “enough” pages, the pagefault
1 min read
Operating Systems | Process Management | Question 6
Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the P operation (i.e., wait) on semaphores a, b and c; process Y executes the P operation on semaphores b, c and d; process Z executes the P operation on semaphores c, d, and a before entering the respecti
2 min read
Operating Systems | Memory Management | Question 9
A computer uses 46–bit virtual address, 32–bit physical address, and a three–level paged page table organization. The page table base register stores the base address of the first–level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second–level table (T2). Each entry of T2 stores the base add
2 min read
Operating Systems | Memory Management | Question 10
Consider data given in the above question. What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer? (GATE CS 2013) (A) 2 (B) 4 (C) 8 (D) 16 Answer: (C) Explanation: 1 MB 16-way set associative virtually indexed physically tagged cache(VIPT). The cache block si
1 min read
Operating Systems | Process Management | Question 6
A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W and X reads x from memory, increments by one, stores it to memory, and then terminates. Each of the processes Y and Z reads x from memory, decrements by two, stores it to memory, and then terminates. Each process befo
2 min read
Resource Allocation Techniques for Processes
The Operating System allocates resources when a program need them. When the program terminates, the resources are de-allocated, and allocated to other programs that need them. Now the question is, what strategy does the operating system use to allocate these resources to user programs? There are two Resource allocation techniques: 1. Resource parti
2 min read