Questions tagged [operating-systems]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

Why do some filesystems have fragmentation and others don't?

I try to understand why fragmentation is a problem for NTFS and FAT but not when using inodes. In all cases, files are not necessarily stored in a contiguous fashion so I don't see the problem for the ...
1
vote
1answer
1k views

How a program is copied to RAM from harddisk

I know that for executing a program, it should be copied to RAM. But the problem is whole of it may not be copied always. Since the size of the RAM is limited, there is mechanism called virtual ...
2
votes
4answers
140 views

Cross platform apps and programing languages…how is it done?

I always wondered how various certain languages like Java, HTML5 and browser extensions are made with cross platform(operates and functions the same, regardless of OS, being Linux/Windows/BSD not ...
2
votes
1answer
11k views

Hierarchical Paging

Suppose I have a system with 32-bit logical and 16-bit physical address spaces, and the page size is 512 bytes. For simplicity, ignore the valid/invalid bits in the page table. How many sections will ...
-2
votes
1answer
310 views

General question about how CPUs send and receive data/bytes to hardware?

Realize I didn't mention x86 or any more details to make this non-specific to any platform, but to just get a general idea of how this is done(this is also a long question with a lot of details). I ...
2
votes
2answers
1k views

Must a deadlock necessarily occur if the four conditions exist?

I understand the four necessary conditions, mutual exclusion, hold and wait, no preemption, and circular wait, for deadlock to occur. However, does there exist a situation where the four conditions ...
3
votes
1answer
2k views

How does a program execute with respect to the operating system?

I am reading Operating Systems by William Stallings 6th edition and I came across this text, Program execution: ...
0
votes
2answers
4k views

Disk scheduling and process scheduling

Whats the diffrence between Disk scheduling and process scheduling? I mean i know the roles of disks and processes, but it seems to me they both have the same aim. to reduce monopolies, they even both ...
0
votes
3answers
21k views

Given the logical address, how to extract the page number?

I am studying Computer Systems. I have th following question and its answer: Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number? Answer: ...
1
vote
1answer
816 views

concurrency and hardware

I've a couple of questions that I need answers for. What I am looking for here is the outline of the answers. Not necessarily the exact complete answer. I can do that. The question is that common ...
0
votes
3answers
13k views

Internal and External Fragmentation [closed]

I am working over a homework problem and am confused on how to determine whether there is internal and external fragmentation given the following table: ...
7
votes
4answers
25k views

The convoy effect in process scheduling

As I understand the convoy effect, in the context of vehicular traffic in a road system. A slow moving group of vehicles passes through the system, slowing traffic even in areas which were not ...
1
vote
1answer
901 views

Hardware interrupts from keystrokes

If there is an interrupt from every keypress (or one for keydown, one for keyup, one for keypress?) how does the OS handle so many interrupts at the same time. A person typing at 120WPM would be ...
8
votes
2answers
18k views

Changing from Kernel mode to User mode (and vice versa)

I am reading Operating Systems book by Galvin. Galvin explains, what are kernel & user modes, instruction privileges given for both modes & also about mode-bit. But I am interested to know how ...
5
votes
3answers
6k views

Look Ahead buffer vs Translation Look aside buffer

I know that Translation look aside buffer is used for address translation in paging to achieve better performance. I came across term called Look Ahead buffer in a document which said it implements ...
1
vote
1answer
288 views

clarification about Algorithm of page replacement LRU with reference bits

Studying LRU approximation Algorithms I think to have not understand how it works, for example: ...
3
votes
2answers
3k views

What mechanisms prevent a process from taking over the processor forever?

Suppose a process keeps running code (e.g. an infinite loop). How can other programs take over? What prevents the process from remaining active forever?
3
votes
2answers
1k views

Dangerous interrupts

Let's say we have a fictional operating system in the user mode. Whenever an interrupt or a trap occurs, the os would switch to the Kernel mode jumping to the address determined from the interrupt ...
1
vote
0answers
5k views

Effective Acces time in Demand Paging system with Associative memory

Q: Consider a demand-paging system with a paging disk that has an average access and transfer time of 20 milliseconds. Addresses are translated through a page table in main memory, with an access time ...
0
votes
1answer
110 views

How Does Dynamic Heap Storage Have Something to Do with Heap?

There are three typical ways to allocate memory for programs: static, stack and dynamic heap. However, when I look at the implementation of dynamic heap memory allocation from wikipedia , what I found ...
2
votes
3answers
62k views

How to work out physical address corresponding to logical address?

I am looking to calculate the physical address corresponding to a logical address in a paging memory management scheme. I just want to make sure I am getting the calculation right, as I fear I could ...
2
votes
1answer
5k views

SSTF disk scheduling algorithm? What if lowest seek times are equal in either direction?

Using the Shortest-Seek-Time-First (SSTF) disk scheduling algorithm (where we select a request with a minimum seek time from the current head position), what happens if the requests in both directions ...
2
votes
4answers
9k views

Calculation of effective average instruction execution time in a 2-level paging system

System has a two level paging scheme Average CPU time for a instruction = 100ns Average number of memory accesses per instruction = 2 Regular memory access = 150 ns Page fault service time = ...
1
vote
1answer
883 views

Processes and Segmentation

The following problem was on my final and in Gate 2006, but I don't understand how to solve it: Different methods of memory management have different overheads: ...
6
votes
2answers
29k views

How does increasing the page size affect the number of page faults?

If we let the physical memory size remain constant, What effect does the size of the page have on the number of frames? What effect does the number of frames have on the number of page faults? Also,...
2
votes
1answer
169 views

Process state in multi threaded process

What would be the process state in a multi threaded process, in which threads are in different states (running, waiting, blocked etc)
3
votes
2answers
2k views

Scheduling algorithms and quantum time

I would like to know what impacts does a scheduling algorithm, let's say Round Robin or FIFO, have on an Operating System. I understand that a scheduling algorithm has the processes run in burst then ...
5
votes
1answer
5k views

Program compilation and execution flow

I was studying operating system concepts from Silberschatz, Galvin and Gagne's book (sixth edition) and I have some questions about the flow of execution of a program. A figure explains the processing ...
5
votes
1answer
342 views

What is the difference between a module in a monolithic kernel and a server in a microkernel?

I´m not exactly sure what kind of impact these two things have on kernel design. Are servers more flexible because of running in user space, for instance, and does adding a module require a new build ...
5
votes
2answers
239 views

What if the electricity goes off while a file is being renamed?

Suppose I'm renaming a file and the electricity goes off right in the middle. Naively, it looks like the file could be in some “half-renamed” state. Maybe the name would have half the old name and ...
7
votes
4answers
7k views

Is the 2nd parity bit in RAID 6 a simple calculation?

I'm trying to understand how the 2nd parity bit or byte is set in RAID 6. I'm reading a paper by H. Peter Anvin, and it goes into Galois field algebra, which is somewhat new to me. Anyway, a rep from ...
3
votes
3answers
4k views

How does worst-fit memory allocation react when encountering contiguous empty memory blocks?

So I have a problem understanding how the worst-fit protocol for memory allocation reacts to contiguous blocks of empty memory. None of the examples I have found address this possibility. For ...
6
votes
1answer
626 views

Variation of the dining philosophers: is the standard solution still valid?

I have a problem that is almost equal to the standard one of the dining philosophers, but has a quirk: while a philosopher thinks, he still holds the fork on his left. If after the period of thinking ...
7
votes
1answer
2k views

How are threads implemented in different OSs?

I was reading Linux Kernel Development by Robert Love, where I came across this Linux takes an interesting approach to thread support: It does not differentiate between threads and normal ...
2
votes
1answer
520 views

Massalin's Synthesis Quajects equivalent to ASM generating macros used in Game Oriented Assembly LISP?

Alexia Massalin's Dissertation on Synthesis was a Phd thesis on Operating Systems that contained a concept called 'Quajects' (see Chapter 4). This is some additional commentary on the Phd Thesis. ...
11
votes
1answer
5k views

Swap space management during pure demand paging

The following is a doubt that I came across while doing a OS home assignment - however, it seems more concept-based than a straightforward coding question, so IMHO I don't think the homework tag is ...
7
votes
1answer
243 views

What techniques exist for energy-efficient computing and networking?

I am currently reviewing the potentials of cloud computing regarding energy efficiency and green IT. In connection with this review I am having a look on techniques for increasing energy-efficiency in ...
9
votes
4answers
13k views

What is meant by interrupts in the context of operating systems?

I've decided to read Operating Systems Concepts by Silberschatz, Galvin Gagne (8th edition) over the summer. I've gotten to a topic that's confusing me - interrupts and their role as it relates to ...
4
votes
1answer
132 views

Requirements for emulation

What are the complete specifications that must be documented in order to ensure the correct execution of a particular program written in Java? For instance, if one were archiving a program for long-...
6
votes
1answer
2k views

How to interpret “Windows - Virtual Memory minimum too low” from a CS student point of view?

On my old 256MB RAM, pc I get this message. (I guess it is quite common) Windows - Virtual Memory minimum too low Your system is low on virtual memory. Windows is increasing the size of your ...
20
votes
7answers
2k views

What are examples of inconsistency and incompleteness in Unix/C?

In Richard Gabriel's famous essay The Rise of Worse is Better, he contrasts caricatured versions of the MIT/Stanford (Lisp) and New Jersey (C/Unix) design philosophies along the axes of simplicity, ...
6
votes
4answers
94k views

What is the average turnaround time?

For the following jobs: The average wait time would be using a FCFS algorithm: (6-6)+(7-2)+(11-5)+(17-5)+(14-1) -> 0+5+6+10+13 -> 34/5 = 7 (6.8) What would the average turnaround time be?
5
votes
2answers
8k views

Which queue does the long-term scheduler maintain?

There are different queues of processes (in an operating system): Job Queue: Each new process goes into the job queue. Processes in the job queue reside on mass storage and await the allocation of ...
50
votes
2answers
21k views

What happens to the cache contents on a context switch?

In a multicore processor, what happens to the contents of a core's cache (say L1) when a context switch occurs on that cache? Is the behaviour dependent on the architecture or is it a general ...
12
votes
1answer
4k views

What is the purpose of M:N (Hybrid) threading?

In other words, what advantages does Hybrid threading have over 1:1 (kernel only) and N:1 (user only) threading? This is a follow-up to What is the difference between user-level threads and kernel-...
33
votes
2answers
44k views

What is the difference between user-level threads and kernel-level threads?

After reading several sources I'm still confused about user- and kernel-level threads. In particular: Threads can exist at both the user level and the kernel level What is the difference between ...
5
votes
1answer
63 views

Which instruction yields atomicity in this expression that makes the result 2?

I am reading about atomicity and came across the following scenario ...
13
votes
1answer
3k views

Are all system calls blocking?

I was reading an article that describes the switch between user-space and kernel-space that happens upon a system call. The article says An application expects the completion of the system call ...
11
votes
4answers
213 views

Why store self and parent links (. and ..) in a directory entry?

Consider an filesystem targeted at some embedded devices that does little more than store files in a hierarchical directory structure. This filesystem lacks many of the operations you may be used to ...
9
votes
2answers
1k views

Round-robin scheduling: allow listing a process multiple times?

In a round-robin scheduler, adding a process multiple times to the process list is a cheap way to give it higher priority. I wonder how practical an approach this might be. What benefit does it have ...