Questions tagged [operating-systems]
Questions about the principles of software that interfaces between hardware and applications.
752
questions
0
votes
0
answers
7
views
Trapframe vs Scheduler Context in Process Management
So a process have scheduler context and trapframe and both of them are allocated in the kernel stack (kstack).
When process wants to transition from user mode to kernel mode, usually due to traps (...
0
votes
0
answers
34
views
How does garbage collection works in operating systems?
As per the author,
...In this case, we generally need to use a garbage collection scheme to determine when the last reference has been deleted and the disk space can be reallocated. Garbage ...
1
vote
0
answers
15
views
How is the physical address calculated in Page tables?
Taking an example, say we have Page size = 4KB, Page Table Entry = 4B, Physical Address Space requires 36 bits
In 3-level multi-paging, let's say the number of entries in the level 3 page table is 2^9 ...
0
votes
1
answer
40
views
What is the optimal resource to follow to learn Operating System?
I wanted to learn Operating System on my own. Although I have learned few basic things from here and there, but wanted to know the suggestions (books, any video lecture, etc.) from this community.
0
votes
0
answers
15
views
Size of the page table
Question
Consider a system which has logical address is 7 bits, physical address is 6 bits , page size is 8 words, calculate the number of pages and no.of frames, size of page table.
Answer
Addressing ...
0
votes
0
answers
19
views
Deadlock in LockTwo Algorithm
I was reading the Book: The Art of Multiprocessor Programming; Section 2.3.2. and I have a doubt regarding their $\texttt{LockTwo}$ algorithm mentioned in Page 26.
The snippet of the algorithm is:
<...
0
votes
0
answers
23
views
How exactly does stale data appear in temporal buffer in Downfall attack?
I've read Downfall paper. In the university, I've had an introductory course on computer organization and operating systems. We also studied Spectre and Meltdown attacks there. I understood the ...
0
votes
0
answers
32
views
Protection in OS
According to the book " Operating Systems Concepts " , 9th edition, page 637, we have the following statement :
Rather than associating the columns of the access matrix with the
objects as ...
0
votes
2
answers
34
views
What exactly is stored in dynamic linking
I read that in dynamic linking we store the references to the the methods of the library , but a library is essentially a collection of files , and every file will have some code in it , so the ...
0
votes
0
answers
13
views
How can I solve the error "Kernel Power EventID 41"?
My laptop started doing this recently
It does this sometimes when I wake it from sleep /standby. It just restarts.
And sometimes when I turn it on (from having it properly shut down the day before).
...
0
votes
0
answers
19
views
What if the size of the logical address is not power of two?
If the logical address and the page size are power of two, then we can separate the virtual address into two parts: page number and offset. Is this still valid if the virtual address is not power of ...
0
votes
1
answer
40
views
0
votes
1
answer
36
views
How are waits in semaphores made atomic in nature?
I was going through the book Operating Systems by Galvin. First they explain Semaphores acting like a mutex.
While talking about semaphores as mutex, they mention that the wait operation of semaphores ...
2
votes
1
answer
39
views
Nonpreemptive kernels in OS
According to the book " Operating Systems Concepts " , 9th edition, page 207, we have the following statement :
Obviously, a nonpreemptive kernel is essentially free from race
conditions on ...
0
votes
0
answers
37
views
How to test progress and bounded waiting in Peterson's algorithm?
This is Petersons's solution for critical section problem. I want to test mutual exclusion, progress and bounded waiting for it. Of course, it satisfied all three.
...
0
votes
0
answers
26
views
Worst Case Response Time (WCRT) analysis the only necessary test for real time tasks?
Recently, I have taken a Computer Science exam for the course Operating Systems. One question was as follows:
Which statements about real-time operating systems are true?
I selected two options, but ...
3
votes
1
answer
65
views
How does the OS track Reference Counters in Copy-on-Write forks?
I'm trying to modify xv6-riscv to perform a copy-on-write mapping when executing fork(), but I'm struggling to determine a concise way to manage the copy-on-write ...
0
votes
0
answers
15
views
Physical memory address space
When you address physical memory, in the kernel, is it just another value like 0xf78f9 just like virtual addresses (and the only thing that is different is that the ...
1
vote
1
answer
43
views
Disk addressing
I am wondering how disk addresses are accessed from a program. From my understanding, the two main facilities are programmed I/O (instructions) and memory-mapped I/O (simply loads and stores). The ...
0
votes
1
answer
41
views
Memory (physical addressing)
From my understanding, physical memory (main memory -- DRAM) is addressed differently than disk. This is all a bit of an abstraction to me, and I am hoping to make my understanding more concrete.
...
0
votes
1
answer
44
views
Page allocation for a program
When my professor explained how the OS handles memory, he described demand paging, and how when a process starts up, the code page with the first instruction is loaded into memory, and everything else ...
0
votes
1
answer
90
views
What does it take to support a programming language on an OS?
From my understanding, something like Linux is very geared towards C programs, with things like libc. What I'm wondering is, even in Java, you have arguments to ...
0
votes
0
answers
38
views
I want to get into Operating Systems, where do I start?
I have been doing web/app development for a few years, primarily involving high-level programming and stuff. However, I am interested in jumping into some low-level stuff and genuinely understanding ...
0
votes
0
answers
15
views
Bidirectional links in file systems?
Typcial links are unidirectional, which has the drawback that the link
will point to invalid if its target is moved or deleted.
Bidirectional links would provide the possibility to update.
Moreover: ...
0
votes
0
answers
13
views
Write-Ordering Problem, Idempotency in Distributed File Systems
I have recently finished reading the section on Distributed Systems in OSTEP. For NFS, they briefly mention the cache consistency problem and say how it is solved for reads by maintaining an attribute ...
0
votes
1
answer
42
views
which formula should i use with this Question
Here is the Question :
The hit ratio is the percentage of times that a page number is found in the Translation look-aside buffer (TLB). An 80% hit ratio means that we find the desired page number in ...
1
vote
2
answers
150
views
Why does Computer Science need so much math?
I'm taking some college courses and they have so much math. Why is that?
I'm very good with computers already software and a little bit of hardware and I fix other laptops/Desktops Linux Boxes, Macs ...
2
votes
0
answers
17
views
Log-Structured Filesystem -- why do we need an explicit, scattered inode map?
From OSTEP Chp. 43:
The imap is a structure that takes an inode number
as input and produces the disk address of the most recent version of the inode
This makes sense to me as a solution to the ...
0
votes
0
answers
16
views
How do emails use batch processing sytems?
Although I understand the definition of batch processing (a method of running software programs called jobs in batches automatically) and some applications of this system (bank statements and payroll ...
0
votes
0
answers
17
views
Concept of a Stream Device
In class, professor mentions that there are Stream and Storage devices. I mean to ask about Stream devices. I've also heard the terminology character devices.
On a Linux VM, the corresponding terminal ...
0
votes
0
answers
15
views
Problems with writing short job first algorithm(for scheduling of processes) in C language
Hy everyone.
I'm trying to write the SJF (short job first) algorithm NON-PREEMPTIVE for scheduling processes in C. I want to implement an algorithm that orders some processes by the burst of the ...
2
votes
1
answer
486
views
Question about Context Switching
I'm reading OSTEP for my Operating Systems course, and I have a question from Chp.6.3:
Note that there are two types of register saves/restores that happen
during this protocol. The first is when the ...
0
votes
1
answer
108
views
I Don't Understand Nothing About Operating Systems even After reading books
I'm a programmer, let's start by that. The question may sound really broad, and in fact it is. I'll list some things that I know, and some other things I've doubts about under the form of questions.
...
0
votes
2
answers
32
views
Executable linking/loading workflow
I'm having a bad time understanding how multiple concepts work simultaneously for achieving linking/loading correctly an executable.
From the very beginning loading/linking is basically the art of ...
0
votes
1
answer
231
views
Scheduling and Resource Management in OS
The below text is taken from the book : Operating Systems: Internals and Design Principles by William Stallings, 8th edition, page 68.
Scheduling and Resource Management
A key responsibility of the ...
1
vote
0
answers
19
views
Disk scheduling: Why use (C-)Scan instead of (C-)Look?
I don't get why SCAN is used when LOOK exists. Why move to the end, when there are no longer any pending requests in that direction?
SCAN: In SCAN algorithm the disk arm moves into a particular ...
3
votes
2
answers
101
views
Race condition, my doubt on Peterson's algorithm vs. C
I have seen this C code showing an implentation of Peterson's Critical Section algorithm. It is obviously skeletal and hardwired for two threads but the logic is supposed to be correct in detail.
...
0
votes
1
answer
65
views
What does it mean for a shell to parse its command line and to identify the PATH?
After accepting the command entered by user,the shell generates a readily executable simple command line by parsing it evaluating variables(if present),performs command substitution,interprets ...
0
votes
0
answers
43
views
Extended BIOS data area vs BDA
I am researching the memory layout/memory map in x86 Real mode and cannot seem to find much about the extended bios memory area other than usual memory address. Is it just that, an extension of BDA ...
0
votes
0
answers
35
views
Memory management with bitmaps
I am reading Tanenbaum's Modern operating systems. I am not able to understand what he means by last line in the attached image. He says that the run may straddle word boundaries in the bitmap. What ...
0
votes
0
answers
57
views
Is Starvation possible in First Come first serve CPU scheduling algorithm
Let's say if we have an infinite process that never yields such that other process dosent get to run. Since FCFS is a non preemptive scheduler does it leads to starvation
0
votes
0
answers
33
views
What is the completion time of the processes using dynamic priority scheduling?
Consider a preemptive priority based scheduling algorithm based on dynamically changing priority.Larger priority number implies higher priority. When the process is waiting for CPU in the ready queue (...
0
votes
1
answer
46
views
How executable binary can be signed?
Some devices (for example Android devices) are "locked", the bootloader checks following bootloader/software sign, right? Chain of trust. Signing technically means that the file must be ...
0
votes
2
answers
59
views
How manufacturers lock their devices to run only software by them? And how it is possible at all?
How do manufacturers lock their devices to run only software by them? And how is it possible at all? For example: upgradeable toothbrush, mobile device, smart watch
0
votes
1
answer
59
views
What does exactly Medium term scheduler do?
I'm trying to know what is the exact function in medium term scheduler in operating systems.
As far my understanding, a process may be needed to be removed from the running queue when it is faced with ...
0
votes
2
answers
78
views
Do i really need to study monstrously long intel manual?
I want to be an OS developer. I can say I am a bit comfortable after i read few tutorial on x86 assembly.
But I see a lot detailed in intel manual, does an OS developer really need to study whole ...
1
vote
2
answers
49
views
Meaning of "untyped bytes" in file systems
I am currently reading reading Chapter 11 of Operating Systems: Principles & Practice by Anderson and Dahlin, which speaks about file systems as abstractions for non-volatile storage.
The ...
20
votes
7
answers
4k
views
Difference between bare metal hypervisor and operating system
I'm currently studying virtualization and while looking at hypervisors I realized that bare metal hypervisors are quite similar to operating systems.
So while from an application standpoint they are ...
0
votes
1
answer
128
views
To where is the mouse sending signals of a computer?
When we move the mouse, we can see the cursor moving on the monitor. I know that mouse can send signals according to its movements. Which component of a computer is receiving those signals in the ...
1
vote
1
answer
50
views
How does symlink work?
I am recently studying The Operation System, I am confused about how symlink work even after watching some YouTube videos, hope there's someone can help me out with some questions. According to wiki, ...