Questions tagged [operating-systems]

Questions about the principles of software that interfaces between hardware and applications.

Filter by
Sorted by
Tagged with
5
votes
2answers
905 views

Is Everything a Hardware Interrupt?

Just need a little help understanding hardware interrupts. As I understand (feel free to correct) a hardware interrupts occurs when hardware wants attention of the computer. In basic terms the ...
0
votes
1answer
47 views

Prove correctness of a solution to the critical section problem in general?

I was wondering if there is any formal, general way to prove the correctness of a candidate solution to the critical section problem in synchronization. For example, in the image enclosed, I have ...
0
votes
0answers
33 views

How is segmentation a solution to external fragmentation

As per Galvin's book, segmentation is the solution to external fragmentation. But in segmentation, the memory blocks are of different sizes. So, if one segment is removed that creates a hole. If we ...
0
votes
1answer
22 views

Are the number of entries in the TLB(Translation Lookaside Buffer) limited?

If not, then why aren't all the pages loaded into the TLB so that TLB misses never happen.
0
votes
2answers
78 views

concurrency in multiple core

I know the basic definition between parallelism and concurrency. But there is not much information about concurrency in multiple core. what is the difference between concurrency in single-core vs ...
2
votes
3answers
452 views

Determine page number and offsets for address references

I'm working on learning operating systems and I've come across a strange question that I don't know how to answer. The question is: Assuming a 1-KB page size, what are the page numbers and offsets ...
1
vote
1answer
34 views

What are the minimum functions, services, or features of a software to be called as an operating system?

When can we say that a software is an operating system and not a firmware, in terms of what it can do? I know that firmware is usually stored in ROM and OS is stored on HDD/SSD, but technically you ...
2
votes
2answers
391 views

Why does page size affect page table size?

I am revising operating systems theory (I'm Italian, forgive me for bad English) and there is a slide that states: If page size is small then we avoid internal fragmentation (I get that) but we have ...
0
votes
1answer
39 views

Understanding how internal fragmentation occurs in systems using only paging with huge page size

The excerpt below is from the OS text by Galvin et. al. When we use a paging scheme, we have no external fragmentation: any free frame can be allocated to a process that needs it. However, we may ...
-4
votes
0answers
26 views

Operating System

suppose that the operating system is running a non-preemptive scheduler and that process P is currently running. A context switch can occour : When P terminates When P blocks. When another process ...
3
votes
1answer
699 views

Does starvation freedom imply progress?

The above answer taken from the book https://www.amazon.com/Operating-Systems-Sibsankar-Haldar/dp/8131730220 says starvation freedom may not imply progress as processes can be deadlocked. I think ...
1
vote
2answers
37 views

How could a page be invalid in demand paging?

I was reflecting on what I learned about demand paging and I have a question: In demand paging, we have entries in the page table only for frames that are present in physical memory. So I was ...
0
votes
1answer
78 views

How to find a condition which leads to deadlock in non-reentrant locks

A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-...
1
vote
2answers
23 views

disadvantages of a long time quantum in scheduling

I'm trying to understand the example showing disadvantages of a long time quantum in Tanenbaum's book in Section 2.4.3 “Scheduling in Interactive Systems”. To improve the CPU efficiency, we could set ...
0
votes
2answers
69 views

When are a controller's registers loaded and ready to inform an I/O Operation?

Below, I appended a fragmented paragraph from Operating Systems Concepts on interrupts. To start an I/O operation, the device driver loads the appropriate registers in the device controller. The ...
0
votes
0answers
23 views

LONG TERM SCHEDULER and how does it interact with USER

If I select chrome browser, then I select Android Studio, do they directly open in Ready Queue (allocated to RAM main memory), what processes actually goes into job queue? Does Job Queue gets filled ...
1
vote
1answer
940 views

Algorithm favours CPU bound or I/O bound processes

Some scheduling algorithms favour CPU bound processes while others favour I/O bound processes. Which algorithm favours which type of process? My answers: SJF favours I/O bound processes.Explanation: ...
0
votes
1answer
6k views

How to calculate average waiting time for round robin cpu scheduling?

I have tried to calculate average waiting time for the below details there are two answers I'm getting using two methods I'm not understanding which one is correct? The time quantum is 2 This is the ...
1
vote
1answer
33 views

How LRU is used without special hardware?

I had been curious as to which page replacement algorithm is used in OSes like Windows and Linux. I could find that most information on the internet pointed at LRU(Least Recently Used) Algorithm. But ...
1
vote
1answer
117 views

Default scan order in SCAN and LOOK disk scheduling algorithms

I've been learning various disk scheduling algorithms in Operating systems. I wanted to know if there was any default scan order in SCAN, C-SCAN, LOOK and C-LOOK algorithms, like towards higher ...
0
votes
1answer
25 views

Are Paging and page cache the same in Operating system?

I was looking at paging in OS. It seems like there are two concepts with the same name but with different features, and I wanted to be clear about those, Paging and page cache. Before I thought paging ...
0
votes
1answer
22 views

Are pages moved to the disk when the process is scheduled?

When process A has run long enough and the scheduler decides to run process B, will all the pages of process A be moved to the disk or they remain in the main memory?
0
votes
1answer
62 views

Where are process pages stored - in the swap space or under file system? Can demand paging work without space space?

The Galvin OS text says that on older systems, there used to be a method, where the entire running process (when in idle state) was moved from the main memory (when main memory ran low) to the disk ...
0
votes
1answer
70 views

Does Dekkers solutions to critical section problem ensure progress?

I was reading concurrency control section from Operating Systems book by William Stallings. In this book, he gives three attempts by Dekker to give solution to critical section problem: Attempt 1 <...
2
votes
6answers
899 views

Representation of unsigned integer on a little endian, big endian computer

This is a GATE 2021 exam question. If the numerical value of a 2-byte unsigned integer on a little endian computer is 255 more than that on a big endian computer, which of the following choices ...
0
votes
1answer
17 views

Where will the TLB entries be stored if the cache memory get full (or can this situation occur)?

As we know that the entries of the TLB get copied into the cache memory once another process is chosen to be run by the scheduler. But what if the cache memory is full and there is no space left for ...
0
votes
1answer
22 views

Whats the difference between baremetal and full-featured in Embedded Systems?

Our professor talked about the "two" types of embedded systems in today's lecture, listing these. 1.) Baremetal 2.) Full-featured Now I found out what he means by baremetal, but I can't find ...
3
votes
2answers
633 views

Paging: Does the page table of a process also gets swapped out when the process gets swapped out from main memory?

Does a process's page table too gets swapped out to secondary storage from main memory when the process gets swapped out to secondary storage from main memory? And gets swapped back in when the ...
0
votes
1answer
38 views

Is whole OS copied to ram when running?

If so, for any OS more than 10gb, how does it run on a computer with limited ram like 4gb? If not, which part of OS is copied to the ram? Or is it dynamically loaded whenever certain part is needed?
2
votes
1answer
117 views

Is process address space part of Process Control Block(PCB)?

I recently read about the process address space and PCB and trying to link them together. I don't find much literature on their relation. Is the process address space a part of the PCB data ...
1
vote
3answers
505 views

How is a program stored before compiling?

When we write code, after compilation the code will be converted to machine language and then stored in the hard disk. But before compiling the code, it is still in the high-level language. How and ...
2
votes
2answers
219 views

Why do operating systems freeze?

I am currently writing from a computer on which a VM has just frozen due to exhausted RAM. I am obviously no expert in the field of operating systems but i know that they implement certain memory ...
0
votes
3answers
17k views

How to compute total internal and external fragmentation

I want to find the total external and internal fragmentation. What I understand is that external fragmentation occurs when processes are loaded and removed from memory, causing memory to be broken ...
1
vote
3answers
83 views

concurrency vs parallelism

I am so confused between concurrency vs parallelism in multi-core processors. If a concurrent process has many threads and if the processor is multi-core then can each thread run on multiple cores? If ...
0
votes
2answers
199 views

Is this a deadlock?

Consider we have two processes P1 and P2. There are also two semaphores M and N which are initialized to zero. Here's how they execute: ...
4
votes
2answers
817 views

Convoy effect in priority scheduling and SJF (Non preemptive)

In books, I have read that FCFS suffers from convoy effect. I think that even SJF and priority(both preemptive and non preemptive) can suffer from convoy effect. In SJF, if a process with large burst ...
0
votes
0answers
22 views

Starvation in Dekkers Algorithm

In the dekkers algorithm for the critical section problem, I happened to have come across a scenario in which P0 can starve out P1 in accessing the critical section(CS)(This is not an assertion, This ...
1
vote
1answer
26 views

What happens if there is context switch while executing system call?

Suppose a process does system call, hence it goes to kernel mode, the registers are saved. Now the system call will be running in process' allocated kernel stack. Can there be a context switch when a ...
0
votes
1answer
377 views

Converting physical address to logical

In 8-bit address space there are 16 pages and the page table stores: 68792EA51BD3CF04 (hex) The physical address is 39h, what is the corresponding logical address? I have literally no idea what to ...
0
votes
0answers
22 views

Process Scheduling (SRTF)-

Consider a uniprocessor system with four processes having the following arrival and burst times: (i) Calculate the average waiting time and also the average turnaround time if shortest (remaining) ...
1
vote
1answer
62 views

Is “capability-based security” vs “hierarchical-protection-domain based security” a false dichotomy?

The wikipedia page on capability-based security states: Capability-based security is to be contrasted with an approach that uses hierarchical protection domains. However, in order to implement ...
3
votes
1answer
57 views

How to use Parallel Semaphores for Dining Philosophers Problem

I am in an intro to OS class and we are learning about mutual exclusion and semaphores. One classical problem we learned about was the dining philosophers problem. My professor touched on the ...
0
votes
0answers
25 views

What does it mean that Atomicity is composable?

I'm reading a book from Michel Reynal called Fault-Tolerant Message-Passing Distributed Systems. In chapter five of the book, The Read/Write Register Abstraction, I have a few questions. On page 85, ...
-1
votes
1answer
41 views

How does a command interpreter/Shell recognize a command?

I want to know when we enter a command in a shell then how does the computer recognize that command? Does it match that command with something already stored in files?
0
votes
0answers
10 views

How do you work out the segmentation table, offset and frame size in segmented memory management?

If I had a process, 1, which has the following segments: Segment 1 - 50 bytes Segment 2 - 200 bytes Segment 3 - 90 bytes and I know that the total bytes in memory is 1024, how do I work out the offset/...
0
votes
3answers
47 views

In Operating Systems, I can't understand why deadlock happens, why does a process not let go of a resource when it is done using it?

I know deadlock occurs when Process A has resource R1 and is waiting for resource R2, while process B has resource R2 and is waiting for resource R1, however why don't both processes just let go of ...
0
votes
0answers
25 views

Confusion about the definition of “Exponential Average”

I was having doubt regarding the concept of "exponential averaging". Till now I have come across the concept twice and they seem to be quite similar (except that they have minor but sharp ...
0
votes
0answers
40 views

In Round-Robin Scheduling with $n$ processes in ready queue and time quantum $q$, each process gets $1/n$ of CPU time in chunks of at most $q$

I was going through the Round-Robbin Scheduling Section of the dinosaur book by Galvin et. al. where I came across the following statement by the authors: If there are $n$ processes in the ready ...
0
votes
0answers
10 views

Difficulty in understanding the “expontential average” plot of the estimate of the next CPU burst with the actual CPU burst

I was going through the portion of exponential averaging (to find the CPU bursts) under Shortest Job First (SJF) Scheduling from the dinosaur by Galvin et. al. Let $t_n$ be the length of the $n$th ...

1
2 3 4 5
14