Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
0
votes
5answers
233 views

Is Virtual Memory unreliable?

I have a question regarding multilevel page tables. As far as I know, in most 64 bit systems only 48 bits are used in page tables which would allow for 256TB of virtual memory to be addressed. For ...
0
votes
1answer
467 views

How is segmentation different from multiprogramming with fixed partition?

As seen here: It works same like multiprogramming with fixed partition and also the memory is contiguous as well. How is it different and especially non-contiguous? What's happening here?
0
votes
2answers
889 views

Since physical memory is the RAM where is logical memory stored on the computer?

Since logical memory maps to the RAM (physical memory) it has be stored somewhere right and it will obviously take large bunch of memory of itself. Where is it stored?
0
votes
2answers
647 views

Since programs are swapped from backing store to main memory why don't they get lost when the computer is suddenly turned off?

So when I play a video, that means the video is moved from backing store to main memory. Then if I remove my laptop's battery all of sudden, that means the video should get lost as main memory is ...
-1
votes
2answers
605 views

how os can calculate cpu cache size?

There's an interview question. In my opinion, os can calculate cache hit rate and miss rate(with the total running time of process and the number of transfer of block of memory to cache). But how can ...
0
votes
0answers
33 views

How operating system is generic with different processors?

I have one query, Operating system (In machine language) as I study is the combination of opcodes that executes, Now, the opcodes are dependent on the instruction set architecture like how and which ...
1
vote
1answer
2k views

Mapping between kernel-level thread and user-level thread

This is my understanding: There are two types of processes: user and kernel(OS). Each process can have single or multiple threads. The threads of a user process are called a user-level thread and the ...
1
vote
1answer
345 views

How unallocated memory space is represented?

I'm doing C programming stuff, and I'd like to know little bit about memory management - My problem is that I'm not understanding where the computer (or the OS or the programs) stores the information ...
2
votes
1answer
210 views

Copy on write is an interesting idea used on server systems. Does it make any sense on a smartphone?

The data pages that are actually modified need to be copied. This approach, called copy on write, improves performance by reducing copying. According to me it is unnecessary as every process has its ...
0
votes
1answer
109 views

How can a operating system run on more than one CPU architecture?

How can a operating system run on more than one CPU architecture? Does the OS detect what type of architecture it is currently running on? If so, does it simply use a different set of code for that ...
2
votes
1answer
488 views

Do modern operating systems use memory control blocks?

I was taught in my operating systems class that sections of memory in the heap are marked as free/occupied through the use of memory control blocks (MCB). The generalized definition of an MCB that was ...
2
votes
1answer
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, ...
-1
votes
1answer
1k views

logical to physical addressing

Consider the page table below (all numbers are in hex) and assume 1 KB page size. Assume 16-bit logical address and 20-bit physical address. a.What are the page numbers and offsets for the following ...
-3
votes
1answer
5k views

How to calculate page size of virtual memory

im new at OS and I want to know how to calculate the page size of this virtual memory system? Information: Physical Memory - 32 KB Virtual Address - 16 bit Offset - 12 bits Current ...
3
votes
3answers
1k views

Round Robin Scheduling

I understand that a big advantage of round robin scheduling over non-preemptive schedulers is that it dramatically improves average response times. By limiting each task to a certain amount of time, ...
1
vote
1answer
258 views

Understanding google's user level threads in kernel threads

I came across Paul Turner work on increasing efficiency of M:N threading model. I am not able to grasp the concept at slide 18 of LPC-User-Threading It says : for two threads ...
3
votes
1answer
603 views

A real life system that faces and solves the dining philosophers problem

I'm looking for an application of the dining philosophers problem. Is there some real life system that faces the concurrency problem of "the dining philosophers problem" and implements a solution? I'...
1
vote
1answer
124 views

Do networking ports come from “port-mapped I/O”?

Do networking ports come from "port-mapped I/O"? I was watching a hardware basic video by Brian Will: https://www.youtube.com/watch?v=9-KUm9YpPm0 And they brought up this concept at 18:15 ...
6
votes
1answer
547 views

Bounded waiting and starvation free in critical section problem

i have 4 question regarding relation between starvation and bounded waiting. 1.Does starvation-freedom imply deadlock-freedom? My Answer-: From here, definition of starvation free is Freedom ...
2
votes
1answer
65 views

Incorporating event handlers

In IDE's we can drag a small continuous collection of pixels in a particular configuration to a place on the screen .This collection of pixels are called as controls . Corresponding to every control, ...
1
vote
1answer
41 views

New Idea for accessing memory across an inter-network connected system

I have the following idea for a network-based operating system. Suppose we have two computers A and B in a network. If computer B wants to access the memory of computer A, it can access by using the ...
1
vote
0answers
24 views

Create a program in Python that works with mathematical operations [closed]

Write a program that takes N numbers as input and prints all 3^(N-1) equations that can be formed by inserting the operators +, -, or * between these numbers (keeping them in the initial order). Also ...
2
votes
0answers
204 views

why valid-invalid bit is needed in simple paging system?

I am learning OS from Silberschatz book. I read the Valid-invalid bit in a process page table also. But I could not understand why valid-invalid bit is required. The pagetable is dynamically built as ...
1
vote
0answers
22 views

optimization problem: Find Phase of input for minimized max output [closed]

Let the $\textbf{bold characters}$ represent the vectors/matrices.All the vectors/matrices/scalars only refer to real numbers. In a continuous LTI system. $\frac{d\mathbf{T}(t)}{dt}=\mathbf{A}\...
1
vote
1answer
442 views

How can context switch affect the modification of a variable?

float myTotalAmount=0; void update(float amt){ myTotalAmount+= amt; } Task A called update(10); Calculated ...
0
votes
1answer
249 views

Round Robin Scheduling: No process in Ready Queue

First post here, glad I found this exchange. I am in my Operating Systems course at university learning process scheduling. In my homework assignment we have to fill out a simulated scheduling chart ...
3
votes
0answers
244 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 ...
2
votes
1answer
480 views

Is thread in operating system = thread function in programming languages?

I'm new to Operating System, just learnt about process and now is about to learn about threads. From what I understand, a program is an executable file, program code a process is a program in ...
1
vote
0answers
27 views

What's the official name of “New” page replacement algorithm?

I am studying some page replacement algorithms. I found an interesting algorithm called "New" algorithm. From page 17 of this slide (https://web.stanford.edu/class/cs346/2015/notes/Lecture_One.pdf) ...
1
vote
0answers
83 views

Where does the CPU scheduler sit in a layered OS design

In a layered approach to OS design, each layer can only access routines from the layers below itself. For example, say I had two levels: memory management and the CPU scheduler Where does the CPU ...
0
votes
2answers
1k views

Compute how much memory is needed for a two level page table

Im studying operating systems and i found an exercise that i cant solve. It asks to compute the memory space needed for a two level page table. The logical addresses are 32 bit, Page size is 4KB ...
2
votes
2answers
682 views

Increment and Decrement on binary semaphores when their values are $1$ and $0$ respectively?

What happens if we increment binary semaphore $x$ when it is equal to $1$. E.g A process executes $V(x)$ when $x==1$; What are the possible cases then- Process would be blocked till $x$ becomes $0$. ...
2
votes
1answer
643 views

When will deadlock occur in this producer-consumer code

I was reading about Producer Consumer problem from Operating Systems by William Stallings where following code was given: ...
1
vote
0answers
317 views

Do user level threads take advantage of multi processing?

I asked this question here on stackoverflow, but maybe because of off-topic over there, it didn't received proper response. Does user level threads take advantage of multiprocessing ? I read one such ...
2
votes
2answers
82 views

how the instructions are stored in relocatable format on disk

I understand how the instructions are kept in relocatable format in RAM. It is done so by keeping a base register and a limit register. Physical address = base register value + logical address. And ...
2
votes
1answer
319 views

Why can level-triggered interrupts be shared but not edge-triggered interrupts?

A key difference between the edge-triggered and level-triggered interrupts is interrupt sharing. Level-triggered interrupts can be shared. Edge-triggered interrupts cannot be shared. I read the line ...
0
votes
1answer
74 views

Understanding x64 and x86 OS with 64bit cpu

Kinda stupid question, but makes me a bit confused. If my OS (Win 7) is 64-bit type system and my CPU is 64-bit, why Program Files directory is marked (x86), x86 stands for 32-bit OS?
2
votes
2answers
213 views

Characterize an OS as multiprogrammed OS

Which of the following features will characterize an OS as multiprogrammed OS? More than one program may be loaded into main memory at the same time. If a program waits for certain event another ...
9
votes
2answers
634 views

What is a file?

I'm looking for a formal definition of file that does not only include storage but also abstractions like procfs or /dev/null (or any fuse-based file) that do not relate to storage. So far I know ...
-2
votes
2answers
172 views

page fault while executing machine instruction

A process executing machine instruction Y right after machine instruction x.On executing x It causes a page fault. what is the next instruction that is executed immediately on restarting the process. ?...
0
votes
2answers
910 views

difference between deadlock avoidance and detection

I know the difference between deadlock prevention and avoidance. But i want to know the difference between deadlock avoidance and detection. ?
1
vote
1answer
124 views

Starvation is possible or not?

let S and Q to be initialized to 1 ...
3
votes
6answers
2k views

Does Deadlock imply Starvation

If there is a deadlock between the processes does that mean that there is starvation also? My Thinking: deadlock is no process using that resources , but starvation is like not giving chance to only ...
0
votes
1answer
332 views

Is Bounded Waiting satisfied for this 2 process Solution?

This is my new post linked with my previous post. Is bounded waiting satisfied in the 2 Process Solution? The answer in that post was very useful and cleared many concepts, but I just want to apply ...
1
vote
1answer
484 views

Is bounded waiting satisfied in the 2 Process Solution?

Suppose, There are $2$ processes $P1$ and $P2$. It is given that Mutual Exclusion and Progress are satisfied by these $2$ processes. Suppose, Programming protocol is designed such that CPU only ...
3
votes
2answers
262 views

Does mutual exclusion hold in this case?

I entered into a discussion with a friend on the following question, which asks if mutual exclusion holds: Consider two processes: $s_1$ and $s_2$ are two variables, set equal initially. P1: ...
-2
votes
2answers
1k views

I/O bound processes over CPU bound processes [closed]

will an OS which favors I/O bound processes over CPU-Bound processes, experience less average waiting time? If yes, why?
3
votes
1answer
7k views

Difference between page table and inverted page table

I do not understand the difference between page table and inverted page table. I know that both are used to translate the logical addresses into physical addresses produced by the processes necessary ...
0
votes
1answer
150 views

Would time travel be useful for optimization?

Let's say we have circuitry that can send pieces of data to the past state of the program through literal time travel. Said time travel takes 1-5 clock cycles (I cannot assume the nature of time ...
1
vote
1answer
1k views

what is the need for valid/invalid bit in paged memory technique?

How is the valid/invalid bit in paged memory useful? I am not able to understand the significance. Is it also somehow used to share the processes among different users.