Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
12
votes
2answers
6k views

What is a GPU year?

I am reading papers in machine learning and they say things like, "This computation took $x$ number of GPU years". What is a GPU year? How long is that?
0
votes
0answers
13 views

What assumptions do I have to make about monitors (in OS)?

I am taking a course in Operating Systems. I am going through old exams and there is a question about monitors. We are supposed to give a solution for the producer-consumer problem using monitors. ...
2
votes
2answers
2k views

Does a context switch happen when a process has terminated?

I know this might sound like a newbie question but let's say we have a priority based scheduling algorithm (non-preemptive) where all processes arrive at time 0 and based on priority the order is P1, ...
-2
votes
0answers
21 views

Too many pop ups on driver install [on hold]

I am setting up a new build machine for my company's software. We have 7 drivers and previously on Windows 7 it would pop up once with do you trust the company and if you clicked "always trust" and ...
3
votes
1answer
70 views

What should be the minimum value when the two threads are executed concurrently

int count=0; void *thfunc() { int ctr=0; for(ctr=0;ctr<100;ctr++) count++; } If *thfunc() is executed by two threads concurrently in a uniprocessor ...
2
votes
1answer
56 views

How can a 32bit CPU have an addressable memory size of 16TB?

Frequently, on a 32-bit CPU, each page-table entry is 4 bytes long, but that size can vary as well. A 32-bit entry can point to one of $2^{32}$ physical page frames. If frame size is 4 KB (212), ...
1
vote
0answers
15 views

Expected value of next CPU burst using exponential averaging

The burst time is needed for Shortest Job First (SJF) and Shortest Run Time First (SRTF) scheduling. To get the approximate burst time, we use the equation $$\tau_{n + 1} = t_n + (1 - \alpha)\tau_n$$ ...
0
votes
1answer
29 views

Calculation of speed up of a program executed in multi-threaded system

Speed up of execution of a program is to be calculated within a multi-threading rather than a single thread system. The program's 30% instruction can be executed serially & rest can be executed ...
0
votes
1answer
46 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
10 views

Does a safe state ensures there will never ever be a deadlock?

In Banker's algorithm of deadlock avoidance, if one can obtain a safe state, does that necessarily mean there will never be a deadlock, or is there still some way that the system could fall into a ...
0
votes
1answer
27 views

Is logical address generated by CPU and MMU same if Physical and Virtual address space are same?

The system has same physical and virtual address space i.e. 32-bit. Are the logical address generated by CPU and address generated by MMU same?
0
votes
1answer
29 views

Lack of Stack Pointer Register

Suppose a processor lacks STACK Pointer Register. But, It does have STACK. Then, in my opinion, a program will still be able to call subroutines but, will be unable to return back from the subroutines....
3
votes
2answers
2k views

Scheduling algorithms and quantum time

I would like to know what impacts does a scheduling algorithm, let's say Round Robin or FIFO, have on an Operating System. I understand that a scheduling algorithm has the processes run in burst then ...
0
votes
1answer
16 views

How many segments a process can have in operating system employing Segmentation for memory management

Some facts about "Segmented Paging" 1) Each process has one segment table. 2) There is one-page table per segment. Fact about "Paged segmentation" 3) Contains page table of segment table. Now ...
9
votes
1answer
1k views

Writing a multitasking operating system for a processor without MMU

I've been thinking of writing a hobby operating system for some of the ARM processors. There are many popular single-board computers with ARM MPU, so I simply wanted to purchase one of those (choosing ...
0
votes
0answers
9 views

How many page-table entries can fit into TLB space

I am looking to calculate how many page-table entries can fit into a corresponding TLB space (Translation Look-aside Buffer ). I just want to make sure I am getting the calculation right, as I fear I ...
0
votes
0answers
11 views

How many page-table entries are needed in case the program uses the whole logical address space

Say I have: page size = 2^12 bytes physical memory = 2^24 bytes logical address space = 2^32 How many page-table entries are needed in case the program uses the whole logical address space?
3
votes
1answer
478 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 ...
4
votes
1answer
86 views

Task scheduling algorithm that limits concurrency

My prof introduced us an algorithm with semaphores that was used to solve the "dining philosophers" problem. The algo is ok, apart from that it limits concurrency. What does mean that it "limits ...
0
votes
1answer
30 views

What is a batch based interface? [closed]

I came across this description of Batch Interface: "commands and directives are used to manage those commands that are entered into files and those files get executed. " I would really appreciate if ...
1
vote
0answers
18 views

Doubts on Virtually Indexed,Physically tagged Cache

I tried referring a few material (videos on youtube and this link as well), but I still couldn't wrap my head around the concept. My (brief) understanding of the Virtually addressed, Physically ...
0
votes
1answer
39 views

How are hardware interrupts handled?

I have read that a hardware interrupt is handled asynchronously by the CPU, which means that the interrupt signal may arrive at any point of time with respect to the CPU clock cycle. Now, this means ...
0
votes
1answer
32 views

Software management of TLB misses?

I'm reading an OS textbook and it was talking about TLB misses being handled by software. I'm very new to all this by the way. So there's a context switch to some kernel procedure. But surely in this ...
1
vote
1answer
127 views

How can i draw a general resource graph which cannot be completely reduced but which is free from deadlock?

How can i draw a general resource graph which cannot be completely reduced but which is free from deadlock? A general resource graph which can be completely reduced and hence is free from deadlock is ...
0
votes
1answer
59 views

What is a 'dynamic entity' in computer science?

I am doing some reading into computer science and how the computing system works in order to be ready for my 1st year at university doing a Computer Science degree. I came across a term within the ...
-1
votes
1answer
7k 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 ...
0
votes
1answer
1k views

Segmentation and paging

I am given a system with a segmented paging architecture. Both physical and virtual address spaces contain $2^{16}$ bytes each. The virtual address space is divided in $8$ equal size segments. The ...
0
votes
1answer
2k views

Operating Systems - SJN/Round Robin - turn around time + waiting time

2.(10 pts) a) You are given 4 processes in a batch system that all arrive at time 0 with the following CPU burst times: P1 : 35, P2: 25, P3: 13, P4: 22. Assuming there is no context switch ...
0
votes
0answers
13 views

Can many threads run in a parallel in many-to-one model?

The book I am reading suggests that in a many-to-one multi-threading model, the threads are unable to run in parallel in a multi-core system. I am thinking this is not the case because if we have many-...
0
votes
1answer
47 views

EDF vs Rate Monotonic context changes

I'm studying real time scheduling algorithms. In particular EDF and Rate monotonic. I have an intuition that using EDF we have less context changes than using Rate Monotonic. But i dont know how to ...
0
votes
1answer
2k views

What is the difference between caching, buffering and paging? Expecting a detailed answer on the OS level

I have been reading about caching and buffering it seems about the same to me can't get hold of the differences clearly and paging, for now the only difference I understand between paging and caching ...
1
vote
1answer
41 views

How are logical addresses of instruction operands mapped to physical addresses?

Is address translation for all operands in single instruction done only once and then are all operands fetched continuously? For example, consider any dummy instruction ...
0
votes
0answers
20 views

Which page replacement algorithm causes thrashing

This is rather simple conceptual question. I can guess the answer, but no text explicitly discuss thrashing in the context of different page replacement algorithm. So I want to take your confirmation ...
0
votes
0answers
42 views

What are necessity and sufficiency?

I was reading deadlock topic from Operating Systems book by Stallings. It states four pre requisites for deadlock: Mutual exclusion No preemption Hold and wait Circular wait It then have following ...
0
votes
0answers
55 views

How can I solve this deadlock related problem mathematically?

I came across following problem: A system has n resources R0,…,Rn-1,and k processes P0,….Pk-1.The implementation of the resource request logic of each process Pi is as follows: ...
1
vote
0answers
19 views

Comparing wait-signal alternatives for synchronizing two piece of programs

I came across following problem: A certain computation generates two arrays a and b such that ...
2
votes
1answer
46 views

Designing solution to critical section problem with two semaphores vs single semaphore

I came across following problem: Let two processes P1 and P2 are there: ...
2
votes
1answer
869 views

How do stack-based cache algorithms avoid Belady's anomaly?

I was going through page replacement algorithms from Galvin's Operating System book. I encountered this line about LRU: A stack algorithm is one in which the pages kept in memory for a frame set ...
1
vote
0answers
19 views

Does this state certify to be called as a deadlock?

I came across following problem: Barrier is a synchronization construct where a set of processes synchronizes globally i.e., each process in the set arrives at the barrier and waits for all others ...
1
vote
1answer
82 views

How does dynamic memory-allocation exactly work?

I have wondered about ordinary code. Assume we are running this code on any modern System like Unix/Linux/Mac/Windows. This code is C, but it should work with every language which is close to the ...
0
votes
1answer
1k 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 ...
2
votes
1answer
66 views

Why is 2^32 in a 32-bit system = 4GiB and not 4Gib?

I was watching this video 32-Bit vs 64-Bit - The Advantage and at 1:19 (timestamp) the narrator mentioned the 4GB memory allocation for the 32-bit system. I later found out it should've been 4GiB but ...
0
votes
0answers
17 views

Why we need size of the page table should be some fraction of virtual address space

The Page Table should have all virtual page number which are in its logical address space, Why it's the case? Is it because we want to access Page Table entry fast just like an array where key is ...
0
votes
1answer
38 views

Why does paging not have external fragmentation?

I have read that paging does not suffer from external fragmentation as the frames and the pages are all of the equal sizes, but when we store a last level page table in a frame at that time it may not ...
1
vote
4answers
8k views

Why do we need the valid-invalid bit in a page table?

I'm reading about memory management in Operating System Concepts, by A. Silberschatz. The author says: [...] the user process by definition is unable to access memory it does not own. It has no ...
1
vote
0answers
25 views

Why in the Map Reduce Implementation, why not stream the records to the reducer (via TCP) as they are being produced by the mappers?

In the Map-Reduce implementation, the reducers start when all mappers finish their jobs. Why don't we stream the records from mappers to reducers while they are being processed instead? I think there ...
3
votes
2answers
65 views

What type of operations are seen the most at the physical disk level — reads or writes? Why?

This question came up in my operating systems class in a section about file system cache and RAID. I'm speculating that the answer is that writes are seen more at the physical disk level because an ...
2
votes
6answers
2k views

How can a CPU access more memory locations than 2^wordsize?

I noticed that CPU's like the 8086 and especially the 8080 have the ability to access more memory than what one would normally assume. The 8080, for example, has an 8-bit word size but can use a 16-...
0
votes
0answers
28 views

Any good source explaining multiprocessor synchronization techniques and their implementation

I need to study how synchronization is done in a multiprocessor operating system, but I am unable to find a good source. I have read about it in the book "Modern Operating System" by Tanenbaum, but I ...
4
votes
2answers
119 views

Why operating system needs interrupt stack, if it has process control block?

I'm reading about an operating system but some concept confuses me. What doesn't confuse me: When an interrupt or system call or processor exception occurs, it happens when user mode tries to ...