Found 990 Articles for Software & Coding

How the operating system manages computer hardware?

Bhanu Priya
Updated on 01-Dec-2021 12:35:20

3K+ Views

Operating systems work as an interface between the user and the computer hardware. It is a software which performs the basic tasks like input, output, disk management, controlling peripherals etc.Windows, Linux etc. are some examples of operating systems.Tasks of Operating SystemsThese are some important tasks of the OS by which it manages the system hardware efficiently, which are as follows −Memory managementMemory management refers to the management of the primary memory each executing process resides in main memory. OS keeps track of memory, allocates memory between processes, and deallocates the memory when the process does not require the memory.Device managementOS ... Read More

What is Peterson's solution?

Bhanu Priya
Updated on 01-Dec-2021 12:32:14

5K+ Views

Peterson's solution ensures mutual exclusion. It is implemented in user mode and no hardware support is required therefore it can be implemented on any platform. Now Peterson’s solution uses two variables: interest and Turn variable.Now we will first see Peterson solution algorithm and then see how any two processes P and Q get mutual exclusion using Peterson solution.#define N 2 #define TRUE 1 #define FALSE 0 int interested[N]=False int turn; void Entry_Section(int process) {    int other;    other=1-process    interested[process]= TRUE ;    turn = process;    while(interested[other]==TRUE && Turn=process); } void exit_section(int process) {    interested[process]=FALSE; }ExplanationThere will ... Read More

What is mutual exclusion by using interrupt disabling?

Bhanu Priya
Updated on 01-Dec-2021 12:29:53

3K+ Views

Whenever a process is accessing the shared variable then that process is said to be in the critical section. If no two processes are in the same critical section at same time then this technique is called mutual exclusion.ExampleMutual exclusion problem with assigned priority is shown below −Let us see the requirements of mutual exclusion and state which of them are met when interrupts are disabled.Whenever the interrupts are disabled, it effectively stops scheduling other processes. Whenever disabling interrupts, the CPU will be unable to switch processes and processes can use shared variables without another process accessing it.The most obvious ... Read More

How can a binary semaphore implement mutual exclusion among n processes?

Bhanu Priya
Updated on 02-Dec-2021 04:09:18

2K+ Views

A semaphore is a shared variable which is used to implement mutual exclusion between system processes. It is mainly helpful to solve critical section problems and is a technique to achieve process synchronization.There are two types of semaphores which are as follows −Binary semaphore − Can take only two values, 0 or 1 which means at a time only one process can enter into the critical section. Semaphore is initialized to 1.Counting semaphore − Can take any non-negative value N which means at a time at most N processes can enter into CS. Semaphore is initialized to N.Critical section is ... Read More

How semaphore is used to implement mutual exclusion?

Bhanu Priya
Updated on 01-Dec-2021 12:25:03

6K+ Views

A semaphore is a shared variable which is used to implement mutual exclusion between system processes. It is mainly helpful to solve critical section problems and is a technique to achieve process synchronization.There are two types of semaphores which are as follows −Binary semaphore − Can take only two values, 0 or 1 which means at a time only one process can enter into the critical section. Semaphore is initialized to 1.Counting semaphore − Can take any non-negative value N which means at a time at most N processes can enter into CS. Semaphore is initialized to N.The critical section ... Read More

What are the essential properties of the different types of operating systems?

Bhanu Priya
Updated on 01-Dec-2021 12:22:36

4K+ Views

The essential properties of the different types of operating systems are as follows −Batch Operating systemJobs with similar needs are batched together and run through the computer as a group by an operator or automatic job sequencer. Performance is increased by attempting to keep CPU and I/O devices busy at all times through buffering, off line operation, spooling and multiprogramming. Batch the large jobs that need little interaction, it can be submitted old for exe and picked up later.Interactive operating systemThe system is composed of many short transactions where the results of the next transaction may be predictable. The response ... Read More

What is dispatcher and difference between dispatcher and scheduler?

Bhanu Priya
Updated on 01-Dec-2021 11:59:38

395 Views

The dispatcher is done after the scheduler. It gives control of the CPU to the process selected by the short term scheduler. After selecting the process, the dispatcher gives CPU to it.Functions of dispatcherThe functions of the dispatcher are as follows −Switching context.Switching to user mode.Jumping to the proper location in the user program to restart that program.The time it takes for the dispatcher to step one process and start another running is known as dispatch latency.Given below is the diagram of dispatcher −DifferencesThe differences between scheduler and dispatcher are as follows −All the processes are in a ready state ... Read More

Differentiate between event driven paradigm and algorithmic paradigms

Bhanu Priya
Updated on 01-Dec-2021 11:57:13

364 Views

Let us understand what algorithmic paradigms are.Algorithmic paradigmsAn algorithmic paradigm is a generic model or framework that underlies the design of a class of algorithms. It is an abstraction higher than the notion of an algorithm, and higher than a computer program.The different algorithm paradigms are as follows −Brute force paradigm.Greedy paradigm.Backtracking paradigm.Divide and conquer paradigm.Dynamic programming paradigm.Event-driven paradigmsThe event-driven is a programming paradigm where the flow of the program is determined by events like user actions (mouse clicks, key presses), sensor outputs, and message passing from other programs or threads.Given below is the diagram of event driven paradigm −DifferencesThe ... Read More

How are system calls connected to the operating system?

Bhanu Priya
Updated on 01-Dec-2021 11:50:51

877 Views

System calls are a method to program for communicating through an operating system. Application developers unable to possess straight access with system calls might be able to access with API (Which indicates the way that software components must communicate).System call provides an interface between the user program and the operating system. When the user wants to give an instruction to the OS then it will do it through system calls. Or a user program can access the kernel which is a part of the OS through system calls.It is a programmatic way in which a computer program requests a service ... Read More

What are interrupts and how interrupt handling is done in modern operating systems?

Bhanu Priya
Updated on 01-Dec-2021 11:48:29

14K+ Views

Interrupts are generally called signals which are generated by the software or hardware when a particular event or process requires immediate attention. So, the signal informs the processor about a high priority and urgent information demand causing an interruption in the current working process.Thus, whenever an interruption occurs the processor finishes the current instruction execution and starts the execution of the interrupt known as interrupt handling. Moreover, for every interrupt handling to occur there is an Interrupt service routine (ISR) or interrupt handler.Interrupt handling in modern operating systemsIn several operating systems such as Linux. mac or windows Interrupt handling is ... Read More

Previous 1 ... 7 8 9 10 11 ... 99 Next
Advertisements