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

learn more… | top users | synonyms

0
votes
1answer
66 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
11 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, ...
3
votes
2answers
25 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
9 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 ...
8
votes
1answer
15 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 ...
2
votes
1answer
18 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
5 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
7 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
11 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 ...
8
votes
1answer
13 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 ...
11
votes
2answers
13 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 ...
9
votes
3answers
21 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 ...
2
votes
1answer
140 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
54 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?
1
vote
2answers
65 views

What is the maximum directly adddressable memory capacity?

This is taken from OPERATING SYSTEMS: INTERNALS AND DESIGN PRINCIPLES by WILLIAM STALLINGS Consider a 32-bit microprocessor composed of 2 fields: first byte contains the opcode and remainder an ...
5
votes
1answer
62 views

Difference between hypervisor and exokernel

An hypervisor (1st type) is a software that creates and run virtual machines, managing guest's operative systems's requests to the hardware. An exokernel is an operative system kernel, that let's ...
0
votes
1answer
45 views

Does a multi cpu system not improve the first come first serve (fcfs) cpu scheduling algorithm?

I created a program that simulates the fcfs scheduling algorithm. First I implemented it for a single core, then modified it for four homogenoues cpus. I compared the results with several datasets, ...
1
vote
2answers
74 views

Why don't hard drives actually delete data?

As far as I understand it, when you delete a file from trash/recycle bin the file isn't actually erased from memory but is instead marked as being okay to be over written. So, my question is as to ...
2
votes
1answer
79 views

How does the OS know the physical address of a process' first memory page?

If I have a program, its instructions are stored on the hard drive. When I double-click the executable the pages of memory for this process must get loaded in to RAM. However, for the pages to get ...
21
votes
7answers
4k views

Does an Operating System inject its own machine code when you open a program?

I'm studying CPU's and I know how it reads a program from the memory and execute its instructions. I also understand that an OS separates programs in processes, and then alternate between each one so ...
3
votes
1answer
50 views

What is the difference between LRU implemented for a cache and for page replacement?

I have read that true LRU page replacement requires significant hardware support, so only approximation of LRU is implemented for page replacement. So I wanted to contrast LRU that is implemented for ...
0
votes
1answer
31 views

Name for almost random memory distribution on the heap

If I had a heap like the following: with blue blocks being occupied memory and white blocks being free memory What is the general name given to the situation illustrated, where the free and ...
0
votes
1answer
42 views

How is heap memory allocated to a process?

I want to better understand how OS provides heap memory to a process. Here by heap memory I mean the memory allocated dynamically, say by call to malloc. When a ...
2
votes
0answers
23 views

How can I talk about priority inversion if it's impossible to specify priority?

In the paper: Leslie Lamport: What It Means for a Concurrent Program to Satisfy a Specification: Why No One Has Specified Priority; ACM Symp Principles of Programming Languages, (POPL-12):78-83, ...
3
votes
1answer
71 views

Are cache contents specific to a process?

Suppose the L1 cache is filled up with data from some process. Now CPU loads another process. Does the new process share cache contents? Or the cache has to be invalidated completely in each context ...
7
votes
0answers
93 views

Can the end-to-end principle be formalized?

In the late 1990s, when I was in graduate school, the paper JH Saltzer; DP Reed; DD Clark: End-to-end arguments in system design. ACM Trans. Comput. Syst. 2(4):277-288, 1984. ...
2
votes
1answer
19 views

Access control matrices: who are the subjects: users or processes?

I'm studying the basics of security in computers. The doubt I have is that the access control matrix is presented as a matrix whose rows are the subjects and the columns are the objects. Also subjects ...
1
vote
1answer
37 views

How can OS schedule disk requests efficiently without knowing the LBN to PBN mapping ?

I learn from the OS schoolbook that the OS has the function that schedule the disk requests with the knowing algorithms such as SSTF, SCAN .. However, the date layout inner disk drives now is very ...
2
votes
1answer
28 views

Filing systems using index blocks

I know that a disadvantage of the index block system is that it can be wasteful of space if the files involved are mostly small in size, as index blocks are allocated from free space as required and ...
0
votes
1answer
65 views

Is the way an OS schedule threads related to parallel computing?

From Wikipedia: Operating systems schedule threads in one of two ways: Preemptive multitasking is generally considered the superior approach, as it allows the operating system to determine ...
0
votes
2answers
198 views

How does an operating system implement the C library?

I have an idea of how a C program is turned into machine code by the compiler. I also know how the processor processes the instructions (https://www.youtube.com/watch?v=cNN_tTXABUA this video has a ...
0
votes
1answer
64 views

How does an Operating System without kernel mode works?

Andrew S. Tanenbaum in his book "Modern Operating Systems 3rd Edition" states that the distinction between operating system software and normal (user mode) software can sometimes be blurred in ...
0
votes
0answers
170 views

size of memory in 64-bit computer system

I'm new here, a brief intro, I'm a student majoring in comp-sci. Right now I'm having a bit confusion to answer one of my assignment, it is about system paging. I want to know how do I able to know ...
3
votes
0answers
52 views

How hardware interrupt works on music

Does music stop for a short interval while listening into it,maybe a milliseconds that we just doesnt sense it cause by interrupts for operating system to run other programs
4
votes
2answers
67 views

Does the OS create its own bootstrapped stack frame when running a program?

I've been doing nand2tetris exercises and I'm quite interested in how compilation actually works. In nand2tetris when creating the VM language I had to create a "bootstrap" which called the main ...
1
vote
1answer
34 views

Can a computer game can run on a boot mode without the aid of os? [closed]

I meant that that the game programmer can just add its own code to the game to manipulate its own low level function as the operating system does provide in a common executables,and load it into the ...
2
votes
2answers
281 views

Why can't I run a mac program natively on windows? [closed]

Basically, I believe that if you have something like a .dmg file the OS opens it with a certain program which takes the code behind it and does things to it. So why couldn't you then take the program ...
1
vote
1answer
21 views

What memory locations will the CPU fetch instructions from with instruction length of 16bits

While reading Stallings OS Internals and Design, I run into problem. Here is example from the book. For example, consider a simplified computer in which each instruction occupies one 16-bit word ...
0
votes
1answer
36 views

Maximum possible file size in the filesystem [closed]

A file system with 300GByte disk uses a file descriptor with 8 direct block address ,1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size ...
0
votes
1answer
48 views

Issue with Multithreading spin locks

a spin lock solution to the critical path problem is shown below . my question is will this or will this not result in starvation ? ...
3
votes
1answer
65 views

Why does making a seemingly insignificant edit to an executable's machine code return errors? [closed]

First of all, I would like to apologize if this question is in the wrong section. For all I know, it could be placed in Super User, Reverse Engineering, or Stack Overflow. Now lets get back the ...
1
vote
2answers
72 views

Which part of the computer allocates memory in RAM?

When we declare a variable there will be a random part of memory will be allocated in RAM. Which component will allocate the memory? Is the processor or any other specific hardware doing the ...
0
votes
1answer
56 views

Hierarchical Paging memory requirements

OS Book written by Galvin et all states that if page size is 4KB and size of virtual space is 32 bits then 2^(32-12) page entries would be required which is too huge to store in memory!! Therefore ...
1
vote
1answer
217 views

Starvation in longest remaining time first CPU scheduling

I want to know if longest remaining time first (LRTF) CPU scheduling has starvation or not. Also give reason how it starve/does not starve a process. I know longest job first (LJF) may starve a ...
0
votes
2answers
359 views

Deadlock and cycle in a resource allocation graph

Here is a resource allocation graph asked in my Operating Systems Theory midterm. The question is, "Is there a deadlock here? Explain your answer in detail" Ra and Rb are resource sets and every ...
2
votes
2answers
157 views

What is Simultaneous Multithreading

I come from an electronics background. I know that there are three types of implementations of multithreading (see Computer Architecture: A Quantitative Approach, 5th Edition): Fine-grain ...
1
vote
2answers
60 views

Is there a way to compute time without system clock

I was thinking about any method where we can use RAM I/O speed, to calculate time, let's say for example: RAM transfer rate is 1000 MB/s, so when it's half full (about 500 M Bytes written), by ...
0
votes
1answer
228 views

Exponential averaging for SJF CPU scheduling

Calculate the exponential averaging with $T_1 = 10$, $\alpha=0.5$ and the algorithm is SJF with previous runs as $8,7,4,16$. 9 8 7.5 None I am getting 4. None as the answer. ...
0
votes
1answer
74 views

How do context switches factor into CPU utilization?

When studying operation systems, is context switch time included in CPU utilization time? For example, if 5 percent of CPU time is wasted to context switching, is CPU utilization 95 percent?
2
votes
2answers
127 views

Is there a shell between the kernel and hardware

First and foremost, i know what a shell, kernel is. Now the dilemma. Today i had my systems viva in college. The examiner asked me is there a shell between the hardware and the kernel. Obviously, i ...