Solved

Executing One process alone in the PC.

Posted on 1999-01-21
6
153 Views
Last Modified: 2010-04-02
Some form exists to execute a alone program in the PC, stopping all the other processes of sistema(screen rest, TSR...)
0
Comment
Question by:rosch
  • 4
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 1184722
You can dissable hardware interrupts for short periods of time.  that would allow you to prevent a TSR from taking over or would prevent a memory refresh from occuring.  You can so this only for a fraction of a second however, before you must enable interrupts again or the computer will die.  Is this what you are talking about?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1184723
From C++ you could do
__asm CLI

to prevent interrupts and do

__asm STI

to enable interrupts.
0
 

Author Comment

by:rosch
ID: 1184724
This dissable of interruptions will function for the processes in the WIN95? I am using Visual Microsoft Studio 5.0
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 22

Expert Comment

by:nietod
ID: 1184725
>> This dissable of interruptions will function for the processes in the WIN95?
Not a chance.  These instructions will fail in protected mode (use of them will cause a general protection fault), since they would allow a program to crash the system if used incorrectly.  

However 16 bit program will still be allowed to use them (which is one of many reasons why 16 bit programs can crash the system).  This is about your only recourse.  The OS isn't going to provide any way for you to have exclusive use of the CPU and is designed to stop any attempt you make.  

Perhaps there is another way, like a high (realtime) thread priority, What are are you doing that you need this for?
0
 

Author Comment

by:rosch
ID: 1184726
>> Perhaps there is another way, like a high (realtime) thread priority, What are are you doing that you need this for?
 Yes.
How? I make VxD ring 0?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1184727
you can use SetPriorityClass() to set the thread's priority class to REALTIME_PRIORITY_CLASS and you can use SetThreadPriority() to set the priority to THREAD_PRIOROITY_TIME_CITICAL.  This does not guarantee that you get all the CPU time, but it comes close.  However, you can only do this for short periods of time or you could crash the system.

A device driver can use the STI and CLI instructions.  This pretty much insures complete CPU access.  I don't know if a VxD can use those instructions though.  
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now