Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
-2
votes
0answers
41 views

dining philosophers problem with deadlock

i have the following code: ...
0
votes
1answer
14 views

Process synchronization problem

The atomic fetch-and-set x,y instruction unconditionally sets the memory location x to 1 and fetches the old value of x in y without allowing any intervening access to the memory location x. Consider ...
0
votes
0answers
23 views

Hierarchical page tables with page size of 8 KB

Consider a machine with a physical memory of 8 GB, a page size of 8 KB, and a page table entry size of 4 bytes. How many levels of page tables would be required to map a 46-bit virtual address space ...
-2
votes
0answers
10 views

What are the advantages and disadvantages of clock replacement algorithm [closed]

What are the advantages and disadvantages when it comes to clock replacement algorithm
0
votes
1answer
32 views

How to find a condition which leads to deadlock in non-reentrant locks

A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-...
0
votes
1answer
34 views

When is it best to use the second chance replacement algorithm?

I'm going through 'Operating Concepts' by Silberschatz, Galvin and Gagne (The Dinosaur Book) and it mentions the Second-Chance Algorithm (not enhanced) as an improvement on the FIFO replacement ...
1
vote
1answer
54 views

Why are special instructions used to implement system calls? Why not use normal subroutine calling instructions?

The transfer of control is often completed through some type of software interrupt instruction. These special instructions result in the CPU to save the current state of the machine and transfer ...
1
vote
1answer
23 views

Is physical pages zeroed out before it's mapped to a virtual page?

I don't how this works. According to me if the physical memory is not cleared then there is some security risk as there may be some sensitive information in it from the other processes. How does the ...
1
vote
0answers
17 views

Determine page number and offsets for address references

I'm working on learning operating systems and I've come across a strange question that I don't know how to answer. The question is: Assuming a 1-KB page size, what are the page numbers and offsets ...
2
votes
1answer
65 views

Difference between *device descriptor* and *device handler*

I am studying Computer Architecture, and am a bit confused about the difference between device descriptors and device handlers in operating systems. Am I correct in saying that a device handler is ...
0
votes
0answers
55 views

Calculating max file size

The question is "For a file system with 11 direct blocks, 5 indirect blocks, 2 secondary (double) indirect, 2 triple indirect blocks calculate the maximum file size allowed if block size is 2048 in a ...
0
votes
1answer
42 views

Questions regarding CPU scheduling algorithms ( Round Robin and Priority scheduling )

Consider the following processes : 1) My First Question is if we need to schedule them using preemptive priority scheduling with Round-Robin for equal processes priorities with a quantum of 3. Here ...
0
votes
1answer
24 views

NRU: Page fault on writing?

I am trying to understand the concept of NRU from the following link. I have got some problem in understanding the text below: NRU page replacement Algorithm If the hardware does not have these ...
0
votes
1answer
24 views

Making sense out of byte-order in text

I have stumbled about the way a text file is saved by the OS. I have typed: printf "ab" | hexdump and the output was: 6261 which are the letters in reversed ...
1
vote
0answers
38 views

How do computers really communicate with hard-drives on x86_64?

All of us have saved a file on our computers using a programming language. If I look down through the layers of abstraction, I usually get stuck at a kernel-level call or a C-call like ...
0
votes
0answers
19 views

Preemptive priority scheduling problem with same priority

So if T1(priority 3, arrived first) was preempted it is put back to the runqueue. If there is already T4(priority 3, arrived fourth) inside the runqueue, which one of these two will be handled first?! ...
2
votes
1answer
92 views

What is cold-start penalty ? What are some ways to reduce it?

when a new process is created using a fork() function, there is a cold start penalty, what is this and why does it happen?
0
votes
0answers
37 views

Spin-Lock and Busy-Wait

This question has been asked and the top answer https://stackoverflow.com/a/38173155/12862537 is not satisfactory. So, it would be nice if someone could specifically point out the similarities and ...
0
votes
0answers
17 views

Android apps IPC during navigation of activity

During navigation of activities in an Android app by clicking back button, the current activity is paused, the previous one is restarted and resumed and the former is stopped. How does activity ...
0
votes
0answers
193 views

Can a TLB hit lead to a page fault?

$Can$ $a$ $TLB$ $hit$ $lead$ $to$ $a$ $page$ $fault?$ My answer is yes, as say even after a TLB hit if the page in the memory is dirty and it will lead to Page fault. Other case can be that, it is ...
0
votes
0answers
13 views

Message passing inter process communication

I was reading a book on OS by Galvin. I well understood that blocking send will wait until it has loaded the message into the kernel buffer. In contrast, the non-blocking send system call will return ...
0
votes
2answers
37 views

How are Operating systems involved in execution of programs?

By my understanding, operating system is the abstraction layer above hardware. Which means that an operating system that supports two different CPU architectures can run the same code. But I still ...
0
votes
0answers
16 views

Another feasible way to implement multi-level page table?

The advantage of a multi-level page table is that we can swap the inner-level page tables to some secondary storage. If however we want quick access to the whole address space, we have to keep all ...
-1
votes
1answer
95 views

what is the difference between an adapter and a controller?

1- why do have a USB controller but a display adapter ? 2- I have heard the terms network adapter and network controller being used, is there a differance between those ?
0
votes
0answers
12 views

working set bits in working set approximation

I am looking at the example pdf from Cornell found here: https://www.cs.cornell.edu/courses/cs4410/2016su/slides/lecture13.pdf Also reading OS Concepts 10e Chapter 10 but it does not go into detail. ...
1
vote
0answers
18 views

Operating System scheduling

I was reading a book on Operating System by Galvin and came across this : In the latest version of Solaris, scheduling is controlled by loadable tables. Depending on the table currently loaded, the ...
2
votes
2answers
41 views

Can the same machine word sometimes be data and sometimes be code?

I have a question about machine words. We have data and a code segment in the memory which is addressed. If we take a word from it and let's say it is a code (instruction), and another one is some ...
0
votes
1answer
38 views

Does Dekkers solutions to critical section problem ensure progress?

I was reading concurrency control section from Operating Systems book by William Stallings. In this book, he gives three attempts by Dekker to give solution to critical section problem: Attempt 1 <...
1
vote
1answer
102 views

Question about system calls

I had read about the various functionalities of system calls recently in one of my coursebooks and about how they are used to allocate memory for new processes. The book didn't specify whether it was ...
0
votes
0answers
113 views

What does this mean: “The compile-time and load-time address-binding methods generate identical logical and physical addresses”?

I read this in my Operating System textbook. Does it mean that the logical addresses generated by compile-time binding scheme are the same as the logical addresses generated by load-time binding? Or ...
0
votes
1answer
21 views

Operating System code suffers more cache misses than user code

I was going through the text of the book Computer Architecture: A Quantitative Approach. It has a section in Chapter 5 where it discusses the fact that OS code undergoes more cache misses as compared ...
2
votes
0answers
36 views

Why can't OS's keep audio and video recording in sync?

It seems every program that purports to record webcams fails to keep audio and video in sync. Moreover, there are probably man millenia being spent by people trying to correct for this during editing....
0
votes
2answers
86 views

Is this a deadlock?

Consider we have two processes P1 and P2. There are also two semaphores M and N which are initialized to zero. Here's how they execute: ...
0
votes
0answers
26 views

Deadlock: can the processes know about deadlock occurrence

Deadlock can happen when two processes are waiting for resources held by each other. Here can the two processes know that they are waiting for each other to release resources?
2
votes
2answers
78 views

Why doesn't everyone use distributed operating systems?

As requested by a moderator, this question as been separated from my question about microkernel-based operating systems. In the 1980's, the team that developed C and Unix developed a distributed ...
3
votes
1answer
253 views

Why doesn't everyone use microkernel-based operating systems?

From what I have read on operating systems, the impression I have been receiving is that, for at least 30 years, "everybody has known" that microkernel-based operating systems are "better" than ...
1
vote
1answer
25 views

Is “capability-based security” vs “hierarchical-protection-domain based security” a false dichotomy?

The wikipedia page on capability-based security states: Capability-based security is to be contrasted with an approach that uses hierarchical protection domains. However, in order to implement ...
1
vote
0answers
20 views

Journey of a process from compilation to execution [closed]

I am reading operating system, and after reading some topics (Processes, Main Memory management) I got somewhat confused. I have knowledge about certain things but I am not able to combine and ...
0
votes
0answers
28 views

Deadlock in resource allocation graph

I am unsure if there is a deadlock in this particular graph. Not sure if P2 and R2 make a cycle. As well as P2 - R3 - P1 - R1 - P2. It seems there is a cycle, but not sure if there is a deadlock ...
4
votes
0answers
39 views

Is there a OSI model equivalent for describing the abstract layers present in performing a computation for an operating system?

In describing where a system vulnerability exists, I often find a need for a model that partitions a operating system and its components into abstraction layers. Similar to how the Open Systems ...
0
votes
0answers
16 views

Research papers related the Android OS's Adaptive Battery and Screen Brightness

I want to read the details of the Adaptive Battery Optimization and Adaptive Brightness techniques used in the Android operating systems as mentioned in this wired.co.uk article. I tried looking for ...
1
vote
2answers
45 views

Does pre-emption of a process occur when that process is busy waiting?

I was reading about Peterson's Solution for Synchronisation. Let's assume the two shared variables to be int bool flag[2] and ...
0
votes
0answers
17 views

External fragmentation of memory

Im trying to calculate the external fragmentation of a memory with the content UFFFUUFFUU where U is used, and F is free. Im confused as to how to do this, when i dont know the number that Used is ...
0
votes
0answers
14 views

How Are Segment Descriptors Used

I am following through James Molloy OS tutorials and I can't get my head around the GDT. I understand that it contains entries that describe segments, what I don't understand is,how are the segment ...
17
votes
13answers
10k views

Why do we need full-fledged workstations running massive OSes with massive software?

I've grown up with computers. While watching old computer TV programmes and documentaries and reading the news about constant issues with these modern systems -- everything from the sheer amount of ...
0
votes
0answers
28 views

Doubt in effective memory access time in case of n level paging + TLB

I am getting confused with calculation of EEMAT(Effective memory access time). I decided to close the book and think on my own and make an equation. Please see whther this is correct or not. I thought ...
0
votes
0answers
55 views

how worst fit better than best fit?

I am a beginner. I have recently started studying OS. In textbook, it is written as best fit is worse than worst fit. Reason - external fragmentation. IMO,in case of variable partionioning, best ...
2
votes
1answer
33 views

doubt in pipelining

I am not from cse but trying to learn computer architecture on my own. Please clarify the following. In case of pipelining, each stage or subcomponent or subtask is assumed to be done in 1 CPU ...
0
votes
1answer
36 views

When does a semaphore issue a wait and when does it issue a signal?

In my textbook, Operating Systems: Internals and Design Principles (9th Edition) by William Stallings in chapter 5, it explains how semaphores work: The fundamental principle is this: Two or more ...
0
votes
0answers
8 views

Study of cache behaviour of algorithms on Virtualbox

I want to study certain cache oblivious algorithms and cache behaviour of some other algorithms I wrote in general. I want to understand, is it advisable, if I do this study in an virtualized ...

1
2 3 4 5
12