operating-system

How do Operating Systems prevent programs from accessing memory?

别等时光非礼了梦想. 提交于 2021-02-08 19:12:53
问题 My understanding currently is, I can write an operating system in C I can write a program for that operating system in C When I write an operating system I can see all of the memory When I write a program the operating system hides memory from other programs from me. Whenever a program runs inside an OS it appears to the program as if the memory it is allocated is all the memory the computer has How does the CPU / OS achieve this? Is this something purely implemented on the software level? Or

How do Operating Systems prevent programs from accessing memory?

百般思念 提交于 2021-02-08 19:05:54
问题 My understanding currently is, I can write an operating system in C I can write a program for that operating system in C When I write an operating system I can see all of the memory When I write a program the operating system hides memory from other programs from me. Whenever a program runs inside an OS it appears to the program as if the memory it is allocated is all the memory the computer has How does the CPU / OS achieve this? Is this something purely implemented on the software level? Or

How do Operating Systems prevent programs from accessing memory?

我怕爱的太早我们不能终老 提交于 2021-02-08 19:05:11
问题 My understanding currently is, I can write an operating system in C I can write a program for that operating system in C When I write an operating system I can see all of the memory When I write a program the operating system hides memory from other programs from me. Whenever a program runs inside an OS it appears to the program as if the memory it is allocated is all the memory the computer has How does the CPU / OS achieve this? Is this something purely implemented on the software level? Or

Micro scheduler for real-time kernel in embedded C applications?

浪尽此生 提交于 2021-02-08 11:18:36
问题 I am working with time-critical applications where the microsecond counts. I am interested to a more convenient way to develop my applications using a non bare-metal approach (some kind of framework or base foundation common to all my projects). A considered real-time operating system such as RTX, Xenomai, Micrium or VXWorks are not really real-time under my terms (or under the terms of electronic engineers). So I prefer to talk about soft-real-time and hard-real-time applications. An hard

Combine mp4 files by order based on number from filenames in Python

戏子无情 提交于 2021-02-08 08:24:45
问题 I try to merge lots of mp4 files from a directory test into one output.mp4 using ffmpeg in Python. path = '/Users/x/Documents/test' import os for filename in os.listdir(path): if filename.endswith(".mp4"): print(filename) Output: 4. 04-unix,minix,Linux.mp4 6. 05-Linux.mp4 7. 06-ls.mp4 5. 04-unix.mp4 9. 08-command.mp4 1. 01-intro.mp4 3. 03-os.mp4 8. 07-minux.mp4 2. 02-os.mp4 10. 09-help.mp4 I have tried with the solution below from the reference here: ffmpy concatenate multiple files with a

Can multiple OS processes run in parallel on multicore CPU?

孤人 提交于 2021-02-08 05:11:00
问题 So I got into a debate whether multicore CPU allows parallel execution of separate processes. As far as I understand, each core allows executing different threads but they all have to belong to one process. Or am I wrong? My reasoning is that, while each core has separate set of registers and L1/L2 cache (depending on hardware), they all have to share other stuff like L3 cache or TLB (I don't have a lot of knowledge about cpu architecture, so feel free to correct me). I tried searching for an

Can multiple OS processes run in parallel on multicore CPU?

微笑、不失礼 提交于 2021-02-08 05:10:51
问题 So I got into a debate whether multicore CPU allows parallel execution of separate processes. As far as I understand, each core allows executing different threads but they all have to belong to one process. Or am I wrong? My reasoning is that, while each core has separate set of registers and L1/L2 cache (depending on hardware), they all have to share other stuff like L3 cache or TLB (I don't have a lot of knowledge about cpu architecture, so feel free to correct me). I tried searching for an

Identifying faulting address on General Protection Fault (x86)

馋奶兔 提交于 2021-02-07 13:13:05
问题 I am trying to write a ISR for the General Protection Fault (GP#13) on x86. I am unable to figure out from the INTEL docs as to how I can find out the faulting address causing the exception. I know that for Page fault exceptions (GP#14) the cr2 register holds the faulting address. Any help is appreciated. 回答1: All references I make here are from AMD64 Architecture Programmer's Manual Volume 2: System Programming, which also describes the legacy protected-mode (i.e., x86) behavior. Figure 8-8

Identifying faulting address on General Protection Fault (x86)

人盡茶涼 提交于 2021-02-07 13:13:00
问题 I am trying to write a ISR for the General Protection Fault (GP#13) on x86. I am unable to figure out from the INTEL docs as to how I can find out the faulting address causing the exception. I know that for Page fault exceptions (GP#14) the cr2 register holds the faulting address. Any help is appreciated. 回答1: All references I make here are from AMD64 Architecture Programmer's Manual Volume 2: System Programming, which also describes the legacy protected-mode (i.e., x86) behavior. Figure 8-8

Native memory consumed by JVM vs java process total memory usage

亡梦爱人 提交于 2021-02-07 09:26:31
问题 I have a tiny java console application which I would like to optimize in terms of memory usage. It is being run with Xmx set to only 64MB. The overall memory usage of the process according to different monitoring tools (htop, ps, pmap, Dynatrace) shows values above 250MB. I run it mostly on Ubuntu 18 (tested on other OS-es as well). I've used -XX:NativeMemoryTracking java param and Native Memory Tracking with jcmd to find out why so much more memory is used outside of the heap. The values