Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
In a system with paged memory, where Copy On Write technique is used, a process creates a new process with fork() call.
Right after creation, the new process tries to write something in the memory. Which error will the CPU generate - page fault or something else?
As far as i know, when copy on write is used, that means that common data is not copied, but when we use fork(), when a new process tries to write in a certain page, that pages stops being shared, and the process created with fork gets a copy of the page so it can write in it.
So, i'm a little confused will the processor generate an error at all?
Page faults are generated by the processor the first time a copy-on-write page is written to, but the fault is handled by the kernel (just like faults on pages that are swapped out or zero-filled). It isn't passed on to userspace.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am developing a program in Delphi. I want this program to detect if another program X is running and close it. I've seen that you can change the name of any program with the WM_SETTEXT message and give it another
name.
Is there any way to see the real name of the program even though its name has been changed with WM_SETTEXT?
If you know the .exe filename of the desired program, you can use EnumWindows() to enumerate the available running windows. In its callback function for each HWND detected, use GetWindowThreadProcessId() and OpenProcess() to open a HANDLE to the process that owns the window, and then use GetModuleFileName/Ex(), GetProcessImageFileName(), or QueryFullProcessImageName() to retrieve its filename. Once you find the filename you are interested in, you will know which HWND(s) belong to that process, and can then close it/them as needed.
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 7 years ago.
Improve this question
What could be a good analogy of "memory abstraction" in computer architecture.
When i Google about it, I get:
A memory abstraction is an abstraction layer
between the program execution and the memory
that provides a different "view" of a memory
location depending on the execution context
in which the memory access is made.
I don't even know what abstraction is.
Please help!.
An abstraction is a layer that sits between two systems and handles the communication, so neither side needs to know about how the other works directly.
I real word example may be the menu at a restaurant is an abstraction layer between the customer and the cook, I don't need to worry about telling the cook how to cook what I want, I can just pick it from the menu, and let them worry about how it comes together.
A more common abstraction in software is a service layer that a web application can send data to in order to have it stored in a database. This allows the application to just send data, and not care if it is going into a MySQL DB, A Mongo DB or whatever, the details of how it is stored are abstracted away, all the application needs to know is that it is stored.
"memory abstraction" is similar, if I have a memory abstraction layer, I can just ask it to store some data for me in memory and not worry about where it's stored, when it's cleaned up or what memory addresses it's in. The abstraction layer can handle the details like that for me.
More good information here... https://en.wikipedia.org/wiki/Abstraction_(computer_science)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I went through the online Falcor videos and tutorials and it sounds very interesting. I am trying to determine if this would be a good fit for our application needs. Somewhere in the presentation I heard that it is very well suited for fairly static application, meaning the data is huge but mostly static. In our case, the data is huge but also gets updated frequently. So, the question how Falcor works when the backend data gets updated frequently.
If data held in client memory becomes stale due to its server-side representation changing (e.g. two separate users manipulating the same part of the graph) then you'll need some sort of server-push-to-client event stream thingy to notify the client of changes so it can keep its data cache fresh.
To my knowledge Falcor doesn't have any built-in hooks for this sort of thing. That doesn't mean Falcor can't be used for dynamic data; most MVC framework have this caveat. Just something to be aware of.
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 8 years ago.
Improve this question
I want to go receiving a file via TIdTCPClient and receiving data that will be saved on disk, such as Skype. In Skype you send a file, the other person accepts and select somewhere to save the file begins to be transferred and the data that have been received will now be saved to disk, so the file is not in RAM. Does anyone know how to do this?
It's a little hard to work out precisely what the question is. But I think the issue is that you don't want to download the entire file to memory, and then write to disk.
I suspect that you are currently using TMemoryStream to receive the data. Doing so compels you to receive the entire file to memory. Avoid that quite simply by using TFileStream instead. Put the data to a file rather than memory.
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 9 years ago.
Improve this question
I'd like the ability to find out how often each output attribute/filter is being applied, so I need per action granularity and I would like my solution to be as efficient/scalable as possible. The perfmon counters (application-wide) (as answered below) are very handy, but I'd like the per action granularity.
I'd be open for a database solution, but it's not preferred, if I went down this route, how would I insert into the database (for when a response is cached), would I have to subclass Outputcache, and write some code in the constructor?
I'd also be open for logging something out to a file? But again it looks like I'd need to subclass.
I'd also be open to Google analytics type approaches, whereby the user response get's it back.
Is there a way to put a 'cached' marker in my http header? This could be used as an identifier as well.
You can use the ASP.Net Applications perf counters. The ones relevant to your question are:
Output Cache Entries
Output Cache Hit Ratio
Output Cache Hits
Output Cache Misses
You can use perfmon's data collector feature to collect these perf counters for you as your application runs.
These are per-app, so you won't get the per-action granularity you ask for.