operating-system

How to check whether specific software is installed or not using javascript in client system?

北战南征 提交于 2021-01-28 00:36:46
问题 Is it possible to detect, whether client system has specific windows application installed or not using Javascript? I developed one website, which would have to detect the application, which was developed by us only. But I want to let you know, the website name and windows application names are different. I mean consider my web application name is X and windows application name is Y not like same as Skype webapplication and Skype windows application Consider Skype, it has web application as

Why should we check WIFEXITED after wait in order to kill child processes in Linux system call?

自古美人都是妖i 提交于 2021-01-27 17:04:58
问题 I came across some code in C where we check the return value of wait and if it's not an error there's yet another check of WIFEXITED and WIFEXITSTATUS . Why isn't this redundant? As far as I understand wait returns -1 if an error occurred while WIFEXITED returns non-zero value if wait child terminated normally. So if there wasn't any error in this line if ( wait(&status) < 0 ) why would anything go wrong durng WIFEXITED check? This is the code: #include <stdio.h> #include <signal.h> #include

Linux kernel behaviour on heap overrun or stack overflow

孤者浪人 提交于 2021-01-27 13:19:03
问题 I am trying to understand few important OS concepts (for simplicity, lets stick to Linux Kernel). Assume I run this in kernel mode , perhaps adding these lines (either caseA or caseB not both) into source code of some system call. # Assume __malloc() here is a simple heap memory manager void consume_heap_forever(void) { for (;;) (void) __malloc(PAGE_SIZE); } Case A: The above consumes heap in a loop. I will first start consuming memory and things will go normal. After a high enough

How to open any program in Python?

前提是你 提交于 2021-01-27 12:10:43
问题 Well I searched a lot and found different ways to open program in python, For example:- import os os.startfile(path) # I have to give a whole path that is not possible to give a full path for every program/software in my case. The second one that I'm currently using import os os.system(fileName+'.exe') In second example problem is:- If I want to open calculator so its .exe file name is calc.exe and this happen for any other programs too (And i dont know about all the .exe file names of every

How can the timer interrupt be 0x08 if the first 32 interrupts are reserved for exceptions?

倖福魔咒の 提交于 2021-01-27 05:05:06
问题 I am developing an embedded program for an intel i386, and I am trying to figure out how to use the hardware timer. I have read here (and other places) that the timer interrupt is 0x08, but this page (And various other sources) say that the first 32 interrupts are reserved for exceptions, and interrupt 0x08 specifically is for double fault. Which is true? How can I setup a timer interrupt handler, using either assembly or very low-level C with no operating system calls? I am developing a

What is a Relocation Register

烂漫一生 提交于 2021-01-27 04:32:54
问题 I am reading the book Operating system 9th edition and in chapter 8 is mentioned a topic called Address Binding in Operating System. While reading the topic I came through a topic relocation register, but I'm still confused concerning the following questions as the book didn't include a fine description to clarify the concept. My questions are What is relocation register ? How it is used in address mapping from logical to physical address? 回答1: The address generated by the CPU is a logical

OS, Kernel, Applications, and Assembly [closed]

安稳与你 提交于 2021-01-26 02:10:32
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Improve this question I'm trying to piece together how these four things work together: 1)Assembly is the language which talks directly to hardware, there is no other language between Assembly and voltages on pins. 2)The Kernel of an OS is a set of Assembly functions that the OS

OS, Kernel, Applications, and Assembly [closed]

谁都会走 提交于 2021-01-26 02:09:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Improve this question I'm trying to piece together how these four things work together: 1)Assembly is the language which talks directly to hardware, there is no other language between Assembly and voltages on pins. 2)The Kernel of an OS is a set of Assembly functions that the OS

python - numpy FileNotFoundError: [Errno 2] No such file or directory

南笙酒味 提交于 2021-01-24 07:04:11
问题 I have this code: import os.path import numpy as np homedir=os.path.expanduser("~") pathset=os.path.join(homedir,"\Documents\School Life Diary\settings.npy") if not(os.path.exists(pathset)): ds={"ORE_MAX_GIORNATA":5} np.save(pathset, ds) But the error that he gave me is: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Maicol\\Documents\\School Life Diary\\settings.npy' How can I solve this? The folder isn't created... Thanks 回答1: Looks like you're trying to write a file to

python - numpy FileNotFoundError: [Errno 2] No such file or directory

荒凉一梦 提交于 2021-01-24 07:02:50
问题 I have this code: import os.path import numpy as np homedir=os.path.expanduser("~") pathset=os.path.join(homedir,"\Documents\School Life Diary\settings.npy") if not(os.path.exists(pathset)): ds={"ORE_MAX_GIORNATA":5} np.save(pathset, ds) But the error that he gave me is: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Maicol\\Documents\\School Life Diary\\settings.npy' How can I solve this? The folder isn't created... Thanks 回答1: Looks like you're trying to write a file to