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
16 views

I want to know the complexity of this following code [closed]

include include include void main() { char p[10][5],temp[5]; int i,j,pt[10],wt[10],totwt=0,pr[10],temp1,n; float avgwt; printf("Enter no of girls:"); scanf("%d",&n); for(i=0;ipr[j]) { temp1=pr[...
0
votes
1answer
17 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
votes
0answers
13 views

How process, file and memory management is implemented in Windows? [closed]

How Microsoft Windows Operating System handle process management, file and memory management? Or how process, file and memory management is implemented in Windows?
1
vote
0answers
34 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
16 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
81 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
34 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
88 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
35 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
55 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
9 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
97 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
46 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
35 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
83 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
74 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
183 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
20 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
19 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
27 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
41 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
16 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
13 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
23 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
44 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 ...
0
votes
0answers
9 views

Are there any models of operating systems which don't require rings of privileges, that are also secure?

I am working on a simple operating system in JavaScript and have noticed that there are two kinds of processes: the "main" process (or "kernel" process), and all the other processes. Basically they ...
1
vote
3answers
85 views

How many registers does a computer *need*?

I read about Why does a processor have 32 registers?, and others. Currently I am messing around with an OS in JavaScript, and wondering how many registers -- or more specifically, how many temporary ...
1
vote
1answer
23 views

Paging - access less than a page of memory

I'm having a bit of trouble understanding how less than a page of memory can be used. From what I understand, memory is given out in page size chunks - say pages are 4096 bytes, and 4 bytes are ...
1
vote
0answers
47 views

Given only TLB Lookup time, and memory access time, can the TLB hit rate be negative?

I'm given the following problem: TLB lookup time is given as 8ns and memory access time for a computer system is given as 40ns. What should be the TLB miss rate to achieve effective memory ...
0
votes
1answer
44 views

Can timestamp be used in synchronization of processes having Race Condition?

I am wondering whether timestamp can be used to solve process synchronization problem, when race condition occurs? Below is an algorithm for entry as well as exit sections for every process who wants ...
0
votes
0answers
10 views

What IaaS services are needed in order to run a server?

I have just learn't about Iaas, Paas and Saas and I was wondering whether a business can host a server by using IaaS services. However, many IaaS providers such as AWS, Azure and Google provide ...
0
votes
0answers
51 views

Does exec cause a context switch?

If we start a new process with exec('process-2') Does this cause an immediate context switch in order to halt the current process and then start the new '...
0
votes
1answer
65 views

Why no context switch is required in case of spinlock in operating systems?

I have a query regarding the fact that how Spinlocks are advantageous in terms of context switching ?
-3
votes
1answer
70 views

What is the name of this experimental OS?

I am trying to find an OS that had a network to verify it's users. It classified itself in classes going from greatest signifigance to least, and the names were galaxy, system, planet, comet etc. I ...
0
votes
0answers
20 views

What assumptions do I have to make about monitors (in OS)?

I am taking a course in Operating Systems. I am going through old exams and there is a question about monitors. We are supposed to give a solution for the producer-consumer problem using monitors. ...
13
votes
2answers
6k views

What is a GPU year?

I am reading papers in machine learning and they say things like, "This computation took $x$ number of GPU years". What is a GPU year? How long is that?

1
2 3 4 5
12