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

learn more… | top users | synonyms

0
votes
0answers
4 views

What's the Time complexity of change directory function in a Unix-Like kernel?

Out of curiosity was searching in some repositories (Linux-v0.01, BSD, GNUCoreUtils). In fact I do not know exactly where would that particular "function-file". ...
0
votes
0answers
9 views

What happens when we move/copy a file from one volume to another?

I have been reading about file systems and I/O subsystems, and I feel that the answer to this question will really help me understand the concepts better. One thing that I have noticed is that unless ...
0
votes
1answer
11 views

Can this question be solved without knowing the Page Table Entry?

I'm preparing for the exams and this question came up - Consider a machine with $64MB$ physical memory and a $32$-bit virtual address space. If the page size is $4KB$, what is the approximate size ...
0
votes
0answers
23 views

Exercise on Scheduling (need a confirmation on the solution) [on hold]

I have been assigned to do the following exercise for my real time systems course: Consider the set of jobs in the image. Suppose that the jobs have identical execution time. $a)$ What maximum ...
1
vote
1answer
15 views

Is Starvation Possible in LOOK Algorithm

The LOOK algorithm (wiki) is the same as the SCAN algorithm in that it also honors requests on both sweep direction of the disk head, however, this algorithm "Looks" ahead to see if there are any ...
2
votes
1answer
16 views

How is the directory implementation done using a linear list?

I am reading Operating System Concepts by Silberchatz, Galvin, Gagne and they write that a directory can be implemented using a linear list. [pg 470, 8th ed] However, I visualize directories as a ...
0
votes
1answer
17 views

How to interprocess communication and scheduling algorithms interact?

I was listening back to a lecture I had, hinting on what we should revise for our upcoming exam. Since then I've covered all the parts, but having difficult in decrypting the following You might ...
0
votes
0answers
10 views

Solution to Infinite-Buffer Producer/Consumer Problem Using Binary Semaphores

Was reading semaphores from Stallings' Operating Systems book. semWait and semSignal for binary semaphore is given as follows: ...
2
votes
1answer
57 views

When should you disable all interrupts in a program?

Consider a machine that has nested interrupts (a higher priority interrupt can interrupt a lower priority one, the current instruction's address is saved and later restored). Why would a programmer ...
-2
votes
2answers
39 views

Books about old Operating systems [closed]

where can i find very old books about old operating systems like CP/M and DOS and other OS that worked on the 8086 ?? second question isn't old books 20 year before and older should have an expired ...
-3
votes
1answer
49 views

Can we build an operating system that can be infected by any virus?

Is it theoretically feasible to engineer a computer (more specifically its operating system) that is simple and primitive enough to be infected with any type of virus? That is, this would be a ...
1
vote
1answer
36 views

Can Shortest Job First Scheduling be subject to convoy effect?

Look at the below table for example : Look at the Non-Preemptive SJF table Suppose if the burst time of process $P_1$ was a very large number compared to $7$, the processes $P_3,P_2$ and $P_4$ have ...
0
votes
1answer
18 views

Maximum I/O Data Transfer if DMA is used

I was reading lecture notes of Universiti Malaysia Perlis when I am came across following question: A computer consists of a CPU and an I/O device $D$ connected to main memory $M$ via a shared ...
6
votes
3answers
117 views

Why is the CPU Involved During Keyboard Echo?

I'm currently studying for a computer science exam, and I've come across a concept that has me somewhat stumped. When one types a key on the keyboard, an ASCII character is transmitted to the CPU. ...
3
votes
2answers
81 views

Overlap between theory and systems fields in CS

I have finally had some serious graduate-level exposure to CS Theory and loved it. I really enjoyed complexity theory (time and space complexity, the different classes, reductions to prove ...
0
votes
0answers
18 views

Switching between user-level and kernel-level threads

After reading difference between user-level threads and kernel-level threads ,now I am in doubt of context switching.Context switching is managed by OS when switching between processes/threads but ...
3
votes
0answers
31 views

What type of operations are seen the most at the physical disk level — reads or writes? Why?

This question came up in my operating systems class in a section about file system cache and RAID. I'm speculating that the answer is that writes are seen more at the physical disk level because an ...
0
votes
1answer
98 views

What is the overhead of Virtual Memory?

What is the price paid for the vast virtual address space provided to programmers for their applications? Or in other words, what is the overhead due to virtual memory? Is there any other overhead ...
0
votes
2answers
54 views

Understanding transactions

In operating systems, Is a transaction a process? Are they the same concept? Does a transaction have the same meaning in database management systems, as in OS? A database book says A ...
0
votes
0answers
34 views

SCAN and CSCAN algorithms of disk scheduling

I am having hard time understanding the working of SCAN and CSCAN algorithm of disk scheduling.I understood FCFS,Closest Cylinder Next but heard that SCAN resembles elevator mechanism and got ...
0
votes
1answer
70 views

Does Second chance Page replacement algorithm suffer with Belady's anomaly?

In Second chance Page replacement algorithm(clock algorithm), if all the Reference bits are set to one, then the algorithm behaves just as FIFO. Considering this case, can we conclude that Second ...
0
votes
0answers
10 views

Location of process in new state

A process has 5 states as shown below . New,Ready,Running,Waiting,Terminated. If a process is in new state. Then my doubt is "where the process is present ?" Is it present in main memory or ...
0
votes
0answers
27 views

Solve a basic mutex lock problem while preventing deadlock

I am solving a problem with a bridge, where you have a one way bridge with people coming from each side. To solve this problem while preventing deadlock (two people going opposite directions on the ...
0
votes
0answers
30 views

Operating Systems Qualifying Exam Visual Study Aids

I have read the Operating System Concepts book, watched a lot of videos on YouTube, practiced with past qualifying exam questions and several exams from other CS departments around the world. ...
0
votes
2answers
70 views

Operating System Paging concept

I am quoting a paragraph from the book "Operating System Principles" by Galvin. Usually, each page-table entry is 4 bytes long, but that size can vary as well. A 32-bit entry can point to one of ...
0
votes
2answers
64 views

How CPU know which process generated an interrupt?

When a computer OS supports multi-program, it needs to have a scheduling algorithm to handle which process will be run by the cpu. If a process is in state 'blocked' waiting for IO, the scheduling ...
0
votes
1answer
44 views

Round-Robin Scheduler - What exactly is the quantum time used for?

Suppose you have three stages for a job: Creation stage = the job gets created Executing stage = the job is executed/served Finishing stage = the job is "marked" as finished. Now, say the quantum ...
-1
votes
1answer
77 views

Calculating disk seek times

I have a system where disk requests come to a disk drive for cylinders in the order 10, 22, 20, 2, 40, and 38 at a time when the disk drive is reading from cylinder 20. The seek time is 6ms per ...
2
votes
0answers
34 views

Mesa Semantics without Starvation?

When a process inside a monitor with Mesa semantics finishes, another process can acquire the monitor. Now there can be starvation here when there is a thread with a lower priority. Are there ...
0
votes
1answer
76 views

Are interrupts needed for a computer system to work?

Are interrupts needed for a computer system to work? Could you have a computer system (hardware and software, including the OS) that worked without an interrupt mechanism?
4
votes
1answer
20 views

How are userland programs executed?

Say we have a simple OS with a filesystem, and some programs on that filesystem. How then does a program get executed by the OS? My understanding is that the executable file gets loaded into memory, ...
4
votes
1answer
53 views

Bare Metal Operating Systems in High Performance Computing

Few years back, I stumbled across Return Infinity - the OS framework designed around flat, 64bit memory model, with minimal MMU / VM overhead, etc. I'm wondering if there are any public benchmarks or ...
3
votes
2answers
62 views

Where is the OS when a process is running?

We know that operating system is responsible for handling memory allocation, process management etc. CPU can perform only one task at a time(assuming it to be single core). Suppose an operating ...
5
votes
1answer
30 views

Can multiple tasks in an RTOS share one stack to save memory?

Many small embedded systems have a limited amount of RAM, 10k or less. I know you can run an RTOS on such systems, however, a realistic number of tasks in such a system is very low, mainly because ...
10
votes
2answers
58 views

How does an operating system create entropy for random seeds?

On Linux, the files /dev/random and /dev/urandom files are the blocking and non-blocking (respectively) sources of pseudo-random ...
2
votes
1answer
36 views

How are system calls handled in a virtual machine?

Quoting wikipedia, a system call is: In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware related services (e.g. ...
9
votes
1answer
33 views

Memory ballooning in the OS

Some hypervisors optimize memory usage using a method that is called ballooning (at least that's what KVM calls it), this method deduplicates memory between VMs and sets common pages to read-only with ...
10
votes
5answers
36 views

Why is the OS design able to reduce power consumption?

I have read that OSes like Android and iOS are somehow optimised to improve battery life. My understanding is that a CPU executes a certain number of operations in a certain time, so I would think ...
1
vote
2answers
10 views

Handling TOCTTOU with system calls

What are some of the best practices when implementing system call functionality for handling/avoiding "Time of check to time of use" (TOCTTOU) security issues?
9
votes
2answers
54 views

What guarantees do “soft” real-time operating systems actually provide

I think I know what a "hard" real-time operating system is. It is an operating system with a scheduler that provides a contract with the application programmer. An application provides a deadline ...
3
votes
1answer
29 views

Which process states exist a multi-processor machine?

In a single-processor architecture, A process might be New, Ready, Running, Blocked and Terminated. Are there any additional states in a multi-processor architecture?
3
votes
1answer
11 views

Relation between Signals and Events

There are POSIX signals (linux man), and various event-based operating systems (such as TinyOS, most seem to be targeted at embedded systems). But the mechanisms seem very similar. Are the terms ...
1
vote
1answer
26 views

Are Time-sharing and multi-tasking operating systems same or different

My question is regarding time-sharing and multi-tasking systems. Time-sharing operating system assigns time slot to each task while multi-tasking OS runs various jobs in parallel. But as I get it, ...
6
votes
1answer
76 views

Writing a multitasking operating system for a processor without MMU

I've been thinking of writing a hobby operating system for some of the ARM processors. There are many popular single-board computers with ARM MPU, so I simply wanted to purchase one of those (choosing ...
9
votes
1answer
57 views

Performance of microkernel vs monolithic kernel

A microkernel implements all drivers as user-space programs, and implements core features like IPC in the kernel itself. A monolithic kernel, however, implements the drivers as a part of the kernel ...
12
votes
2answers
30 views

What are potential pitfalls with having a minimal kernel that runs managed code?

Suppose I want to build an operating system based on a very small native lower kernel that acts as a managed code interpreter/runtime and a larger upper kernel compiled to a non-native machine ...
10
votes
3answers
43 views

How does the processor find kernel code after an interrupt?

When an interrupt occurs, the processor preempts the current process and calls kernel code to handle the interrupt. How does the processor know where to enter the kernel? I understand that there are ...
18
votes
1answer
47 views

Can an interrupt handler be preempted?

Can a running interrupt handler be pre-empted by another interrupt handler? If this is possible, in which scenarios is this safe, and in which scenarios is it not? If this is not possible, why?
2
votes
1answer
170 views

Practical Page-Replacement Algorithms

Could anyone suggest other page replacement algorithms that are applicable to the real world aside from FIFO, Second Chance (Clock), Enhanced Second Chance and Random?
1
vote
1answer
285 views

What's the difference between Clock and Second Chance Page-Replacement Algorithm?

I know that they both have reference bit, but I only understand the Second Chance but not the Clock Page-Replacement algorithm. could anyone help me understand?