Copyrights @ Journal 2014 - Designed By Templateism - SEO Plugin by MyBloggerLab

Friday, January 31, 2003

Device Drivers and Processors
Windows NT and the XP support multiprocessor architecture. Windows platform holds conditions true as
1. All CPUs are identical and also they have no or identical co-processor.
2. All CPUs share memory or have access to the System memory.
3. Considering the sysmmetric platform, all CPUs take inturrupts, access memory or I/O Control registers.
Isn't this all good and makes easy for a programmer?
Windows NT and XP are designed to work on SMP platform. Similar to all other SMP operating systems Windows also take care that the driver sensitive data does not get modified by more than one processor at the same time.
The Spinlocks I wrote about yesterday, are used to preserve the same. For example, a lowest-level driver's ISR that is handling a device interrupt on one processor must have exclusive access to critical, driver-defined data (or the device registers) in case its device interrupts simultaneously on another processor. Understanding the SMP environment, I/O Requests are completed by one processor and device communications are executed by another processor, in this case, the driver critical data has to be shared with all the driver routines.
We cannot expect the any locking system without any policies. See what Microsoft says about this
1 .Only one routine can hold a particular spin lock at any given moment; only the holder of a spin lock can access the data it protects. Another routine must acquire the spin lock in order to access the same data, but the spin lock cannot be acquired until the current holder releases it.
2. Like a hardware or software interrupt vector, the Kernel assigns each spin lock in the system an associated IRQL value. A kernel-mode routine can acquire a particular spin lock only when the routine is run at the spin lock's assigned IRQL.


Microsoft does accept the fact that these policies prevent a driver routine that usually runs at a lower IRQL but is currently holding a spin lock from being preempted by a higher priority driver routine that is trying to acquire the same spin lock, thereby causing a deadlock.

DDK also says
A lowest-level driver's ISR frequently shares a state area with the driver's DPC routine, which calls a driver-supplied critical-section routine to access the shared area. In this case, the spin lock protecting the shared area has an IRQL equal to the DIRQL at which the device interrupts. While the critical-section routine holds the spin lock and accesses the shared area at DIRQL, the ISR cannot be run in a uniprocessor machine because the device interrupt is masked off, as mentioned in Always Preemptible and Always Interruptible.And in a symmetric multiprocessor machine, the ISR still cannot acquire the spin lock protecting the shared data while the critical-section routine holds the spin lock and accesses the shared data at DIRQL

Tuesday, January 28, 2003

"Blogging Indian Fundametalist : Bal Thackeray "
Balasaheb Thackeray, the autocratic leader and also the founder of notorious organisation named Shiv Sena. His control over the the political (I have not seen any famous work by Shiv Sena that can not be described as POLITICAL) organisation has been nurtured by the love from his followers, known as "Shiv Sainik". The relationship between the sainik and Sena Pramukh is totally undefined as the this leader reign is ultimate charisma. I am very sure this condition will persist in party wide elections. Thackeray is very famous for his abilities to motivate the saininks, he is a real very articulate. He had never been any of the chair politics. The followers understand he does not need power and also he is not interested in wealth too.

By-product of democracy
I guess the followers separate the realms of public office and private business and make a distinction between political and "purely economic" corruption. After knowing the facts about the criticism controlled over the Thackeray family and top guns in Shiv Sena, they make the fair judgement. Otherwise it will be very partial by the followers. The follwoers seems like blind for the Charisma of the said.
The normal people speak about his involvement in so called saving "Hinduism" in Mumbai. Afterall thats why we call him a leader, his cheerful motivation in "call of save" has caused him a lot trouble by now. The over wehlming responses are always lead him to a confinement but the follwoers save him by the strikes and riot. The difference between corruption and shrewd politics is very subtle. The personal enrichment can be said as "Human Weakness" as long as the political stimulus is maintened. Masses are aware of this and they don't care. We can sayt it is the by-product of democracy. We cannot avoid or otherwise all will be like "Harishchandra". Nobody is perfect human neither do our politicians.

This leader is famous for the "Remote Control", they call him so, having direct control over the influential politics. Thackerey had always been influencing politics. It can treated well in same manner as we can treat RSS having influencial control over central govt. The ministers keeping a consent of Thackeray for all the decisions he is making.

Somebody has said it right, When hopes are bound within the structures of the party the close relation between aspiration and loyalty reinforces the myth of unconditional devotion to the centre of command. Charisma is thus just as much the grooming of an image as an organisational principle.

Monday, January 27, 2003

Programming the Microsoft Windows Driver Model, Second Edition
by Walter Oney.

Book is released on Dec 16,2002 by Microsoft but still not in market. Just ordered it an waiting for the ReadMe.doc to ship it me. I guess the long list of erratas are reduced. Oney writes very descriptive. The book will be full of diagrams, just waiting for it to be released.
** BOOKS **
Using the Visual Studio 6.0 Driver Build Environment
Digging into the DDK build environment to find out how it works, and if I could extend the environment to be usable within the Visual Studio. My primary goal was to keep the existing environment intact, and furthermore, I want to use this environment within VS 6.
by Christiaan Ghijselinck.

Actually ability to make this happen and using the Visual Studio 6 as the build environment, is the most wonderful, Christiaan explains how it works, I tried it yesteday but I feel it is getting very slowed down during the actual build. May be because, I am running the media player songs continuously, without which I am very slow in programming. I would try without that. Afterall It is one's preference.

Friday, January 24, 2003

Plug and Play Technology
Properly implemented, Plug and Play provides automatic configuration of PC hardware and devices. For modern versions of Microsoft� Windows�, the system and its firmware must comply with Advanced Configuration and Power Interface Specification (ACPI). The driver architecture for Windows XP/2000 supports comprehensive, operating system-controlled Plug and Play.All drivers for all versions of the Microsoft� Windows� operating system should support Plug and Play. A major part of supporting Plug and Play is properly handing Plug and Play I/O request packets (IRPs). This article highlights the key rules that driver writers must follow when handling Plug and Play IRPs.

Plug and Play technologies are defined for IEEE 1394, PCI, PC Card/CardBus, USB, SCSI, ATA, ISA, LPT, and COM.
Each Plug and Play device must:
1) Be uniquely identified.
2) State the services it provides and resources it requires.
3) Identify the driver that supports it, and allow software to configure it.

Plug and Play drivers must adhere to the following rules:
  1. All drivers must have a dispatch routine for handling Plug and Play IRPs.
    A driver sets the address of the routine in DriverObject->MajorFunction[IRP_MJ_PNP] in its DriverEntry routine. This dispatch routine can be a separate DispatchPnp routine that only handles Plug and Play IRPs, or the driver can handle several IRP_MJ_Xxx codes in a single Dispatch routine.


  2. All function and filter drivers must pass Plug and Play IRPs down to the next-lower driver in the device stack unless such a driver fails the IRP.
    All drivers for a device must have the opportunity to handle Plug and Play IRPs for the device, unless a driver fails the IRP. The Plug and Play Manager sends IRPs to the top driver in a device stack. Function and filter drivers pass the IRP down to the next-lower driver and the underlying bus driver completes the IRP. For more information, see the following section, Passing Plug and Play IRPs Down the Device Stack.


  3. All drivers must handle certain Plug and Play IRPs and may optionally handle others.
    Each Plug and Play driver is required to handle certain IRPs, such as IRP_MN_REMOVE_DEVICE, and can optionally handle others. See the Setup, Plug & Play, and Power Management Reference in the Windows NT 5.0 beta DDK documentation for information on which IRPs are required and optional for each kind of driver.
    A driver can fail a required Plug and Play IRP with an appropriate error status, but a driver must not return STATUS_NOT_SUPPORTED for a required IRP.


  4. All drivers must handle a Plug and Play IRP in its Dispatch routine (on the IRP's way down the device stack), in an IoCompletion routine (on the IRP's way back up the device stack), or both, as specified in the reference page for the IRP.
    Some Plug and Play IRPs must be handled first by the driver at the top of the device stack and then by each next-lower driver, as is the case with IRP_MN_REMOVE_DEVICE. Some IRPs must be handled first by the underlying bus driver, as is the case with IRP_MN_START_DEVICE. Still other IRPs can be handled both on the way down the device stack and on the way back up, as is the case with IRP_MN_QUERY_CAPABILITIES. See the Setup, Plug and Play, and Power Management Reference in the Windows NT 5.0 beta DDK documentation for the rules that apply to each Plug and Play IRP.


  5. Drivers must add information to an IRP on the IRP's way down the device stack and modify or remove information on the IRP's way back up.
    When returning information in response to a Plug and Play query IRP, drivers must follow this convention to enable orderly information passing by the layered drivers for a device.


  6. Except where explicitly documented, drivers must not depend on Plug and Play IRPs being sent in any particular order.


  7. When a driver sends a Plug and Play IRP, it must send the IRP to the top driver in the device stack.
    Most Plug and Play IRPs are sent by the Plug and Play Manager, but some can be sent by drivers. A driver must send a Plug and Play IRP to the driver at the top of the device stack. Call IoGetAttachedDeviceReference to get a pointer to the device object for the driver at the top of the device stack.

Thursday, January 23, 2003

Shrikant speaks the truth...
My lifelong memories are false. Riots in India are not a national phenomenon; they are highly localized. In a country that remains mainly rural, religious violence is a chiefly urban problem: the countryside accounts for under 4 percent of all riot-related deaths. Using data from 1950 to 1995, Varshney shows that riots are concentrated in just four of India's 28 states. On a per capita basis, the worst states are Gujarat, Bihar and Maharashtra.
I agree shrikant. In a vast country, population, socialogical mixture, geo-politcal circumstances and the poverty some facts can be validly quoted by Ashutosh Varshney in his research. These definitley seems to be virtual and totally based on case studies. I will say during my life in India for about 22 years. I never saw any riot, just heard of them (I donn want to see also).
The inter ethnic turbulance put more energy in the bad cup. We need to understand the need based social structure and also sharing partners for the resources. The place where the population is growing irrespective of speed of the social living standards. The people just leaving their capsules of joint families and learning the need of a short family. We are still attached with lot of superstitious faiths. Seventy percent of whom has not known the Internet.

The study definitely seems like "sophistication of cutting edge Western scholarship with the empirical richness of micro-level cases studies from India".

Wednesday, January 22, 2003

"Mind your business"
WASHINGTON: JANUARY 22, 2003 The United States has no plans to act as mediator to resolve tensions between India and Pakistan and has asked both the South Asian nations to "discuss their differences directly."
As I was talking about, we run to somebody to resolve our own problems. Seems like in USA no more needs to have any hand in south asian politics. The area where lot of potential was seens in late 70s to late 90s. USA and USSR made lot of countries concerned about their presence in "that" area. A clear and firm base on main land in Afganistan may be the reason for them to withdraw. Now they are near to "Ex-RED", India and also to the "RED" country also. So the bye-bye to India-Pak headache. India and Pakistan needs to settle this issue over a dinner or Delhi-Lahore trip may be?

The only thing they need to decide and act on is "Mind your own Business"

Tuesday, January 21, 2003

"Sisters and Brothers of America"
"As the different streams having there sources in different places all mingle their water in the sea, so, O Lord, the different paths which men take through different tendencies, various though they appear, crooked or straight, all lead to Thee."
SHAMIT BAGCHI posted a blognote on Swami Vivekanand's address in World's Parliament of Religions in Chicago, IL on Sept 11, 1893. The words are still indistinct , the meaning is immortal, the feelings are heavenly. No algebraic equation could ever express that. In the world where everything is 0 and 1 it is unimaginably different. The day remembers history for 2001 but history was already written in 1893. Just the matter people find it hard to recognize and remember. The message of love, peace and the single lord has been deaf for all.

The harassment of Indian Envoy is not new to Indians. I sometimes feel if Indian Govt. wants to punish a learned Indian, they make him in an envoy to Pakistan. The wars have not stopped both sides from getting against each other rather they have been infuriated to do so. The question still remains do we still need a embassy in Pak? After ISI troubles him we try to repeat the act or denouce it to world. If we cannot stop these, stop this dram of having an embassy in Pakistan.
Everytime I feel, we are like kids having done something by friend or brother and then we run to Momy to tell that he has hurt me. Then Mother America or UNO will take side one of us and try to condemn other. Grow up guys!!!

Saturday, January 18, 2003

"The MADHUSHALA"
Translated:
Seeking wine, the drinker leaves home for the tavern.
Perplexed, he asks, "Which path will take me there?"
People show him different ways, but this is what I have to say,
"Pick a path and keep walking. You will find the tavern."
Can we ever forget Madhushala by Dr. Harivansh Rai Bachchan? The great doyen of hindi passed away this Saturday. Amitabh Bachhan is known as son of him.

Friday, January 17, 2003

MANUSHI Manushi, founded in 1978, is a serious journal which aims to bridge the gap between academic/scholarly writing and popular literature. The magazine analyses political, economic and social issues from a people-oriented perspective.
A fair distance maintained by the magazine between reality and the journalism. They donn speak which is not undoable.... reading through found an article on Women in politics. their roles and values are more discussed than their contributions. Do they really take advantage of them being women? Why they should not. The women in India feel so oppressed and if a woman can lead the country, they become proud, feel one who herself doing it. In India, women who prove themselves stronger and more commanding than men are able to use their gender to advantage rather than it becoming a liability for them. The mesmeric hold Indira Gandhi acquired over the Indian imagination is largely due to her ability to frighten and manipulate male politicians and make them act as her minions. Indian men don�t seem to feel embarrassed or resentful falling at the feet of such women but they can be both clumsy and aggressive with most women who clamour for equality or appear vulnerable and dependent.
"Leave me alone"
I am waiting to hear this from our great President APJ Abdul Kalam. This person is with extraordinary brain for changes. He can handle the new ideas in better way. A born scientist has a vision as well as feelings for disabled children. He had a dream of implantable bio-neuro-chips for metally challenged children.
Some curiosities turned the stones and now it may happen as a reality. A good leader is the one who who just merely has ideas, I will say vision. A good manager has ability to get it done, he has power or power and always a good follower makes it happen best. I am really helpless in defining APJ Abdul Kalam.
A visionary is always needed to bring up a nation but a scientist... why are we pushing him in politics. It is a quagmire. People drown in that. Politics is good for good ... seems like. If somebody has power and a good vision as APJ has, can do a lot better things, as APJ is doing. a wonderful example of ones abilities. .......

Thursday, January 16, 2003

Thursday, January 16, 2003 (Mumbai):
Senior leader and Congress MP Sushil Kumar Shinde is set to take over as Maharashtra's new Chief Minister. A consensus on his appointment emerged at the Congress Legislature Party (CLP) meeting in Mumbai today.
Indian Politics is the reason. Indian politics is more than you can ever talk about. There is no end. Just seen the news as Sushil Kumar Shinde is elected as Congress leader will replace Vilasrao Deshmukh. This elections merely seems to be the understanding between two leaders who are for the chair. I was reading InstaPundit written about the Presidential Elections in United States. As per Glenn Reynolds view he is right saying that "The system are designed to select or elect who love their job", but this doesn't seems like. It may be true in USA but cannot be in India. Priya Raj has not drawn any "Caricature Person In The News" for Mr. Shinde other wise I would have linked it by now.
It is really a shame that after 50+ years of Independence Mr. Shinde will be the first Dalit CM of Maharashtra. Dont we people feel bad to say "I am not racist"? Seems like Uttar Pradesh State is more advanced in India, they have so called overcame the racism. But still a long way to go for them too.

In the Maharashtra Legislature, Shinde and Deshmukh were known as do hanso ka joda. They were good friends and they will be.... Hope they prove to be good friends of common man in Maharashtra also.

Monday, January 13, 2003

Introducing Smart Personal Objects Technology Watch from Fossil
Time that�s always timely. The new Smart Personal Objects Technology watch from Fossil is the first device to marry fashion-forward timekeeping with timely data access. As one of the first devices to utilize Microsoft�s dynamic new Smart Personal Objects Technology platform, the watch will deliver up-to-date and fully customized news, sports, and weather directly to your wrist, in stylish watch designs that look every bit as good as they perform.

This can be an example of speed of technology. It usually changes more than u do. then there is a way of saying that I dont need it now. But some people like me who have alrady registered for the first to use the product, and pre-ordering information. Waiting for Summer 2003. Though it is just the begining....... hope these never ends.

Sunday, January 12, 2003



ZHappy Anniversary Blogging !!!!

- VismiT

The Hindu : Ratan Tata to function as non-executive chairman
MUMBAI DEC. 28. Ratan Tata, who turned 65 today, would now function as non-executive chairman of the Tata group. The board of directors has already given the nod to Mr. Tata continuing as non-executive head of the group with effect from tomorrow
Mr. Tata started as his career as executive chairman in 1991 but drew the outline of the Tata business in 1980 much before he was assigned as chief. Lets hope this is not the sunset of the great businessman and his reign.
A lot of business schools make a case study on Mr. Tata looking at him as a powerhouse of business ethics and originality of ideas as a entrepreneur.

Monday, January 06, 2003

FTPFind.com
SEARCH for normal search just enter your keyword to search it in other word and find the URLs of the corresponding files, but it will be a search of all the ftp:// Urls, you can search on system files, document files, software too. This is one of it own kind. It does not need any logons.
Windows File search
Do you know we cannot run a search on Microsoft Windows which returns more than 10,000 file, I myself tried it on Windows 95/98/NT. Its kinda different. Try searching *.* and check the results. Good news is it does not crash but gives a good message as the file search excceds the maximum searching capabilities.

Thursday, January 02, 2003

NTSTATUS.H
As we all know most of the kernel mode driver routines return the error status codes as defined in the ntstatus.h file residing in the includes directory of DDK. The NTSTATUS is defined in ntdef.h and the status codes are defined in ntstatus.h file. If the routine succeeds, it must return STATUS_SUCCESS. Otherwise, it must return one of the error status values defined in ntstatus.h.


NTSTATUS Layout (source DDK)
The Sev field shown in the NTSTATUS Layout figure indicates the severity code, which must be one of the following system-defined values: STATUS_SEVERITY_SUCCESS: success NTSTATUS value.
STATUS_SEVERITY_INFORMATIONAL : informational NTSTATUS value
STATUS_SEVERITY_WARNING : warning NTSTATUS value
STATUS_SEVERITY_ERROR : error NTSTATUS value
The Facility code specifies the facility that generated the error.
Drivers also set the C bit to indicate the NTSTATUS value is specific to a particular component, and not system-wide.

DDK also adds that drivers cannot use custom NTSTATUS values for IRPs that can be received in user-mode, because only the system-defined values can be translated into Win32 error codes.

NTSTATUS Types are success, informational , warnings, and error. When testing for a successful return from a routine, usage of the system macro is recommended as follows.
NT_SUCCESS(Status) : TRUE if success or informational (0 to 0x7FFFFFFF).
NT_INFORMATION(Status) :TRUE if informational (0x40000000 - 0x7FFFFFFF).
NT_WARNING(Status) : TRUE if warning (0x80000000 - 0xBFFFFFFF).
NT_ERROR(Status) : TRUE if error (0xC0000000 - 0xFFFFFFFF).