Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [operating-systems]

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

2
votes
0answers
43 views

Can you read a file as a binary number?

This is a pretty naive question, but I would like to better understand the basics of information storage on a computer. I am not concerned with the detail of how any one operating system achieves ...
1
vote
0answers
296 views

Difference between inverted page table and a standard one?

I know that for standard page tables each process would have its own page table and for inverted the OS would have it. But other than this what are the main differences between a standard page table ...
0
votes
1answer
302 views

Effectiveness of TLB

This is a book question: Suppose that a machine has 48-bit virtual addresses and 32-bit physical addresses. Suppose this same system has a TLB (Translation Lookaside Buffer) with 32 ...
1
vote
1answer
117 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 ...
1
vote
2answers
106 views

Why are programs executed in main memory?

Why are programs kept in main memory for execution? As per my understanding, we need a memory management scheme to manage several processes in the main memory. These things can be done in secondary ...
1
vote
0answers
62 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 ...
1
vote
1answer
400 views

External fragmentation in fixed size partitioning

Can external fragmentation occur in fixed size partitioning ? I searched everywhere but couldn't find a sentence which says external fragmentation is not possible in fixed size partitioning. Please ...
1
vote
1answer
399 views

Does interrupt (for I/O and etc) requires support of Preemption? What is the relation between interrupts and Preemption in O.S?

So i just don't understand the relation between interrupts and Preemption in O.S? For example in Multi-programming, do we need the support of Preemption or not? when a process needs I/O and sends an ...
5
votes
2answers
2k views

Do system calls always means a context switch?

When a system call takes place some kernel code must be executed. If some kernel code is being executed it means it can alter register values. So before this code gets executed the old process state ...
0
votes
3answers
363 views

How can a spinlock progress when it's busy-waiting?

I read that in spinlock, process keeps on waiting for the lock continuously in a loop until it receives signal(lock) or ...
3
votes
1answer
120 views

Are Test and set primitives as powerful as semaphores?

I get confused because i don't know if it is possible to use Test and Set primitives in case where more then one process can be enter in critical section at the same time.
1
vote
0answers
1k views

Resource Allocation Graph Algorithm

In the book Operating System Concepts, it is said that: A claim edge $P_i \rightarrow R_j$ indicates that process $P_i$ may request resource $R_j$ at some time in the future. [emphasis added] ...
1
vote
1answer
556 views

Signed and Unsigned Loads in a 32-bit Registers

I have a question over this quote directly out of Computer Organization and Design, 5e: Signed versus unsigned applies to loads as well as to arithmetic. The function of a signed load is to copy ...
0
votes
1answer
2k views

Operating System: Performance of Demand Paging

I am reading Operating systems from the book "Operating System Concepts" by Peter Baer Galvin, 7th edition. Performance of Demand Paging: Let p be the probability of a page fault (0 $\leqslant$...
0
votes
0answers
110 views

Why TurnAround Time is considered as Performance Metric for Scheduling Algorithms?

I know what is turn around time but i am confused why wating time is not considred as Performance Metric for Scheduling Algorithms Since it gives the time for which a Process will wait till it gets ...
1
vote
2answers
41 views

If you increase the address space for an OS, does the Phys Mem used by the program increase?

I am learning about the OS. I know: that Address Space Size = # of pages x page size So if I increase Address Space Size, then the number of pages increases:(not the page size). However, isn't the ...
1
vote
1answer
2k views

What is “time-slice multi-threading”?

My goal is to understand the exact differences between SoEMT, SMT and "time-slice multi threading". Thus far I already found information on SoEMT and SMT and it does not seem to hard to find more on ...
2
votes
1answer
44 views

Should we assume both processes are getting same CPU clock while we solve SYNCHRONIZATION problems in uniprocessor system?

In synchronization, when one process is in a critical section & another is busy waiting, both are using CPU. But in a uni processor system, in the same clock both cant get the CPU. So there must ...
1
vote
1answer
1k views

Process Synchronization: Dekker's algorithm

This Screenshot is taken from William Stalling's Operating Systems book. My doubt is that Bounded wait is not satisfied by this solution. For example: P0 and P1 both want to enter critical section ...
1
vote
4answers
7k 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
365 views

Physically indexed virtually tagged cache

PIVT cache is indexed physically so address translation using TLB is needed to get into cache and we use virtual address as the tag for comparison . I read that homonym is a problem which is caused ...
2
votes
1answer
431 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 ...
1
vote
1answer
50 views

Program counter format LC-2

Not really sure if this is an exact CS question. I'm reading the Patt/Patel Introduction to computing systems Powerpoint presentation and I don't understand about the program counter and instruction ...
1
vote
0answers
241 views

Internal fragmentation basic concept

Suppose I have two processes of 50 bytes and have only one partition (hole) of 100 bytes. Suppose the first process takes up the partition and 50 bytes is remaining . Can the second process reside in ...
0
votes
1answer
717 views

Deadlock and safe state

I read that system being in safe state doesn't guarantee that deadlock is not possible. Can someone give me an example where system is in safe state and deadlock is possible?
2
votes
1answer
127 views

Numerator of HRRN scheduling formula

In the HRRN scheduling, priority formula is P = (W+E)/E , where W: waiting time and E: estimated run time. CPU finds the job that has highest priority value and does that job. However, the formula ...
1
vote
1answer
48 views

Is the term page replacement actually a misnomer?

My understanding is that "page replacement" entails replacing the contents of a frame to bring in a new frame in it's place corresponding to a new page. Since it is not the page, but the frame that ...
0
votes
0answers
66 views

What happens when accessing 0x00ABBA?

Given the following page table with a 24 Bit virtual address and 4KB page size and 4 byte long entries (%X means hexadecimal values): I don't understand how to translate e.g. address %X00ABBA here. I ...
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 ...
2
votes
1answer
64 views

What is the basic idea behind the usage of TLBs?

I know how Translation Lookaside Buffers work, and i also know we use them to improve the performance of data/program access by storing the recent page numbers - frame numbers in a memory cache. The ...
2
votes
1answer
688 views

Operating system maintains copy of page table for each process

I am quoting a paragraph in Operating System Concepts by Silberschatz, in paging chapter, In addition, the operating system must be aware that user processes operate in user space, and all ...
0
votes
5answers
226 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
441 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
800 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
645 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
545 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
32 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
306 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
200 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
97 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
457 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
1k 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
4k 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
961 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
232 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
560 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
110 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 ...