Questions tagged [operating-systems]
Questions about the principles of software that interfaces between hardware and applications.
769
questions
-1
votes
1
answer
19
views
0
votes
1
answer
18
views
Process Synchronization and Atomic Instructions
According to the book " Operating Systems Concepts ", ninth edition , page 210, we have the following statement :
Many modern computer systems therefore provide special hardware
...
-1
votes
0
answers
30
views
Does a processor need different addressing modes?
I know, the general answer to this question is yes; I am also aware that risc-v instruction has limited bits for addressing. But what I don't understand is, how 2GB is not enough for a program to ...
0
votes
1
answer
38
views
Roles of 80386 MMU Paging Unit and similarity with modern CPU MMU
While searching for the structure of the MMU, I found the image below (80386 Internal Architecture).
I have three questions.
Q1. I'd like to know the roles of 'Adder', 'Page Cache', and 'Control and ...
0
votes
1
answer
22
views
What happens for hardware Interrupts in non-preemptive scheduling?
In non-preemptive scheduling, the running process cant be interrupted .But what will when the CPU receive a hardware interrupt such as the an interrupt from the printer indicating that the current ...
1
vote
2
answers
46
views
What is point of calling syscalls in the kernel?
If syscalls are meant to transition into kernel mode from user mode, what is the point of calling syscalls in the kernel?
Reference: https://stackoverflow.com/questions/15841327/can-we-call-system-...
0
votes
0
answers
14
views
Which queue does `wait()` suspended process goes into?
According to javatpoint, ready and wait queue are different. But according to wikipedia they are synonymous, in this context. Now I am more confused.
What I want to know is, when the parent process ...
0
votes
1
answer
26
views
Processes with communication exclusive from the OS
Most OSes use the message passing system to let 2 processes communicated with each other.This works by a shared mailbox between the OS and each process loaded in the RAM however are there processes ...
0
votes
1
answer
47
views
Two-Level Threading Model
In multithreading models, we have a two-level model in which we multiplexes many user-level threads to a smaller or equal number of kernel threads but also allows a user-level thread to be bound to a ...
0
votes
1
answer
27
views
Process Control Block
As we know, the operating system maintains a data structure for every process called process control block. My question is where this data structure is stored inside the OS ?
0
votes
1
answer
41
views
A question about layered architecture in OS
In layered architecture, the operating system is broken into a number of layers (levels). The bottom layer (layer 0) is the hardware; the highest (layer N) is the user interface. Each layer is ...
0
votes
1
answer
32
views
Understanding the Relationship Between CPU Registers Amounts and Maximum RAM in 32-bit Architectures
To my knowledge,
The number of CPU registers can tell us the maximum RAM we can have. I am only talking about physical memory, no virtual memory or virtualization in my question.
A 32-bit CPU ...
0
votes
1
answer
47
views
What is the difference between Application Programs and System Programs?
In Operating Systems, What is the difference between Application Programs and System Programs? Also, what are examples of each?
0
votes
1
answer
61
views
Device Controllers in OS
According to this article, we have the following:
The device controller gets data from a connected system device and
temporarily saves such data in a special purpose register inside the
controller ...
0
votes
0
answers
41
views
Is the OS kernel part of the main() of the OS or is it a seperate function?
I am wondering is usually the OS kernel which provides a link between 2 processes part of the main() of the os or is it a seperate function?In other words do we usually encapsulate the OS kernel in ...
0
votes
2
answers
42
views
Is communication between processes really important for a OS or is it just a convenience?
One of the services of a OS is communication between processes.However how much important is that?I dont think it is that important just for example if we saved a .txt file the file explorer wouldnt ...
0
votes
1
answer
26
views
Why when we use DMA , Read/Write operations on I/O devices are faster?
I am wondering why are read/write operations on I/O devices much faster when we use DMA?I must be that when using DMA we have 1 less clock cycle to access the local buffer of a IO device since it is ...
0
votes
2
answers
66
views
Why can't we mount multiple filesystem in same mountpoint?
Systems impose semantics to clarify functionality. For example, a system may disallow a mount over a directory that contains files; or it may make the mounted file system available at tha directory ...
0
votes
0
answers
17
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
47
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
27
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
53
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
17
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
22
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:
<...
1
vote
1
answer
34
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
36
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
14
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
21
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
100
views
0
votes
1
answer
74
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
52
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
58
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
30
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
91
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
19
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
47
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
43
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
62
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
104
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
39
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
17
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
18
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
60
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
159
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
18
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
18
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
20
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
578
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 ...