operating-system

How does an operating system draw windows on the screen?

扶醉桌前 提交于 2020-08-24 07:33:33
问题 I realized after many years of using and programming computers that the stack of software that actually draws on the screen is mostly a mystery to me. I have worked on some embedded LCD GUI applications and I think that provides some clues as to a simplified stack but the whole picture for something like the Windows operating system is still murky. From what I know: Lowest level 0 is electronic hardware (integrated circuits) that provide a digital interface to turn a pixel on the screen a

Can a C executable file run on all operating systems

我的未来我决定 提交于 2020-08-10 04:14:41
问题 If I create a C executable file in an operating system (ex: Windows), can this file run on other operating systems (as: Linux, Mac-OS). 回答1: Trying to give a complete answer, it would be a theoretical "yes" with a really big "but". The first thing to understand: a binary executable created by a C compiler doesn't differ in anything relevant from one created by a compiler for some other language. So the following doesn't have to do anything with C. There are two issues about that. Operating

Difference between Sensitive Instructions and Privileged Instructions

徘徊边缘 提交于 2020-08-06 04:34:51
问题 I've been searching for a clear difference b/w a Sensitive and Privileged instruction but its all blurry right now. As far as i know: A sensitive instruction NEEDS TO trap to kernel mode if executed in User space else it gets ignored while a Privileged instruction WILL TRAP to Kernel mode if executed in User space. This difference is vague and unsatisfactory for me. Feel free to drop an AWESOME answer! EDIT: Just a thought, are these the same thing? 回答1: The terms are usually used in the

What happens when parent-child listen on the same port?

浪尽此生 提交于 2020-07-19 06:46:11
问题 I have a parent which when it starts, kicks off a thread that creates an instance of TCP Server that listens on port X. After this, the parent starts forking off child processes (which do few things and exit). Note that these child processes inherit fds from parent and hence end up listening on port X. The parent program has a handler for requests coming in on port X but the child process has no such handler (it is a os.execv()-ed C++ program) I know that child process could close all fds, in

os.getenv returns empty output - python

假装没事ソ 提交于 2020-07-10 10:29:29
问题 I am new to python and encountering some issues while executing os commands. I have set my environment variables like as shown below SPARK_HOME = '/opt/spark' HAIL_HOME = '/opt/hail/hail' When I type os.getenv('SPARK_HOME') , I get the below output '/opt/spark/' But when I type os.getenv('HAIL_HOME') , I get blank output Please note that I type the above two commands from a virtual environment using jupyter notebook. Why it works for spark and returns empty for hail Can guide me with this

os.getenv returns empty output - python

▼魔方 西西 提交于 2020-07-10 10:29:01
问题 I am new to python and encountering some issues while executing os commands. I have set my environment variables like as shown below SPARK_HOME = '/opt/spark' HAIL_HOME = '/opt/hail/hail' When I type os.getenv('SPARK_HOME') , I get the below output '/opt/spark/' But when I type os.getenv('HAIL_HOME') , I get blank output Please note that I type the above two commands from a virtual environment using jupyter notebook. Why it works for spark and returns empty for hail Can guide me with this

Any tool(s) for knowing the layout (segments) of running process in Windows?

妖精的绣舞 提交于 2020-07-07 07:21:12
问题 I've always been curious about How exactly the process looks in memory? What are the different segments(parts) in it? How exactly will be the program (on the disk) & process (in the memory) are related? My previous question: more info on Memory layout of an executable program (process) In my quest, I finally found a answer. I found this excellent article that cleared most of my queries: http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html In the above

Any tool(s) for knowing the layout (segments) of running process in Windows?

我怕爱的太早我们不能终老 提交于 2020-07-07 07:19:34
问题 I've always been curious about How exactly the process looks in memory? What are the different segments(parts) in it? How exactly will be the program (on the disk) & process (in the memory) are related? My previous question: more info on Memory layout of an executable program (process) In my quest, I finally found a answer. I found this excellent article that cleared most of my queries: http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html In the above