473,471 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

64 bit computing

Hi,

Introducation:
I am about to write a custom DB ( for video storage ) using unmanaged C++,
the optimal technology for such a DB would be usage of mapped files, BUT
32bit computing limit the address-space to ~4GB, to br able to manage more
then 4GB the machine and code should be 64bit compatible.

The Query:
Does the compiler that ships with VS.NET 2003 support 64bit instruction set?
Is there anything special I should take in mind while developing such a
system (concerning 64bit compatibility)?

Any comments would be appreciated...

--
Nadav
http://www.sophin.com
Nov 17 '05 #1
6 1059
Hi Nadav!
Does the compiler that ships with VS.NET 2003 support 64bit instruction set? No. You need to use the latest PSDK:
http://www.microsoft.com/downloads/d...6-9DA2B03D9B92
Is there anything special I should take in mind while developing such a
system (concerning 64bit compatibility)?
If you first want to develop a 32-bit app, then you should enable
"detect 64-bit Protability Issues (/Wp64)"
Any comments would be appreciated...


Some general links:
See: Porting 32-Bit Code to 64-Bit Code
http://msdn.microsoft.com/library/en...o64BitCode.asp

See: Overview of the compatibility considerations for 32-bit programs on
64-bit versions of Windows Server 2003 and Windows XP
http://support.microsoft.com/kb/896456/EN-US/

See: General Porting Guidelines
http://msdn.microsoft.com/library/en...guidelines.asp

See: 64-Bit Issues (DDK)
http://msdn.microsoft.com/library/en...1dc78d.xml.asp

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #2
Nadav wrote:
Hi,

Introducation:
I am about to write a custom DB ( for video storage ) using unmanaged
C++, the optimal technology for such a DB would be usage of mapped
files, BUT 32bit computing limit the address-space to ~4GB, to br
able to manage more then 4GB the machine and code should be 64bit
compatible.


IMO, using a single linear file mapping is unlikely to be a good solution on
any platform due to address fragmentation and other issue. Note that SQL
server manages just fine to address 100's of Gb database on 32-bit windows.
The trick to handling larger files is to move one or more smaller file
mappings over "windows" into the entire file. With that technique you're
really only limited by disk space.

You don't need a 64-bit machine for what you're trying to do.

-cd

Nov 17 '05 #3
Hi Carl,

Thanks for your responce, usage of large file mappings doesn't prevent usage
of the technique you have suggested, mapping a file into memory will map the
physical pages to memory BUT will not actually load them, the pages are
loaded by the kernel as a result of a PAGE_FAULT caused when tring to access
the paged memory block, hence, accessing a fixed size memory window ( part of
the already mapped DB file ) will have the same fragmentation impact, usage
of large file mappings ( while accessing a small subset window of it at a
tiem ) will save the burthen of remapping a subset of the whole file each
time the 'window' is to be moved and this would simplify implementation...

Any comments would be appreciated,

Nadav.

"Carl Daniel [VC++ MVP]" wrote:
Nadav wrote:
Hi,

Introducation:
I am about to write a custom DB ( for video storage ) using unmanaged
C++, the optimal technology for such a DB would be usage of mapped
files, BUT 32bit computing limit the address-space to ~4GB, to br
able to manage more then 4GB the machine and code should be 64bit
compatible.


IMO, using a single linear file mapping is unlikely to be a good solution on
any platform due to address fragmentation and other issue. Note that SQL
server manages just fine to address 100's of Gb database on 32-bit windows.
The trick to handling larger files is to move one or more smaller file
mappings over "windows" into the entire file. With that technique you're
really only limited by disk space.

You don't need a 64-bit machine for what you're trying to do.

-cd

Nov 17 '05 #4
> Thanks for your responce, usage of large file mappings doesn't prevent
usage
of the technique you have suggested, mapping a file into memory will map the physical pages to memory BUT will not actually load them, the pages are
loaded by the kernel as a result of a PAGE_FAULT caused when tring to access the paged memory block, hence, accessing a fixed size memory window ( part of the already mapped DB file ) will have the same fragmentation impact, usage of large file mappings ( while accessing a small subset window of it at a
tiem ) will save the burthen of remapping a subset of the whole file each
time the 'window' is to be moved and this would simplify implementation...

Any comments would be appreciated,

I think I understand your method, but a few things come to my mind:

* How do you map this file? I think by loading the complete file in memory
first.

* I thought this is stored into a virtual file? And I always thought that
the virtual disk space was about 2 times the physical memory in that
computer. So even though the 64 bit exactuable has 16 exabytes of memory
addresses, only the amount of virtual memory will determin if it is possible
how big it will actually get.

* It only works for singel user.

I believe your system would be perfect if you have to access random bytes of
dat, like a 3D image, but for typical database applications this migth be
overkill. But I do agree that the access of memory will be very fast since
the OS does all this and you do not need to program anything.
Nov 17 '05 #5
I think I understand your method, but a few things come to my mind:

* How do you map this file? I think by loading the complete file in memory
first. Well the actual data isn't loaded to the memory, rather, it uses the same
paging mechanism used with virtual memory, hence, each phisical disk page has
it's VIRTUAL memory address, the actuall memory allocation is done by the IO
Manager when a PAGE_FAULT is generated ( the PAGE_FAULT is generated when
tring to access a page that is commited out of memory ), taking what was just
said in mind, files being mapped to memory doesn't load until their mapped
address space is being accessed in which case a PAGE_FAULT is generated, this
causes the page to be read from disk and loaded into memory.
* I thought this is stored into a virtual file? And I always thought that
the virtual disk space was about 2 times the physical memory in that
computer. So even though the 64 bit exactuable has 16 exabytes of memory
addresses, only the amount of virtual memory will determin if it is possible
how big it will actually get. Well, the manner I intend to use mapped files doesn't relay on virtual
memory, rather, a big existing DB file is being mapped to memory, all memory
pages in this range are 'mapped' to this file, when a page is pagedout of
memory it's data is commited to the file, this is a very convinient way to
access a file at the same manner memory is accessed.
* It only works for singel user. Well, I would have to check it...
I believe your system would be perfect if you have to access random bytes of
dat, like a 3D image, but for typical database applications this migth be
overkill. But I do agree that the access of memory will be very fast since
the OS does all this and you do not need to program anything.

Nov 17 '05 #6
Nadav wrote:
Hi Carl,

Thanks for your responce, usage of large file mappings doesn't
prevent usage of the technique you have suggested, mapping a file
into memory will map the physical pages to memory BUT will not
actually load them, the pages are loaded by the kernel as a result of
a PAGE_FAULT caused when tring to access the paged memory block,
hence, accessing a fixed size memory window ( part of the already
mapped DB file ) will have the same fragmentation impact, usage of
large file mappings ( while accessing a small subset window of it at
a tiem ) will save the burthen of remapping a subset of the whole
file each time the 'window' is to be moved and this would simplify
implementation...


Yes, it will simplify the implementation IF (and only if) you're only
interested in dealing with video clips of limited size. Otherwise, you're
simply increasing the maximum time you can deal with before going to a
windowing/paging system, and you'll end up going to the moving window
technique even on 64 bit windows.

Unless you're doing something that requires very sophisticated random access
to large data, I wouldn't even consider using a file mapping. Simply using
unbuffered async I/O will give you greater efficiency in most cases
(afterall, that's what the filemapping is using behind your back).

-cd
Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andy | last post by:
First of all, can I reassure you that this posting is NOT spam and not market research. Please feel free to email me at the address below to check/validate this message prior to doing the survey if...
39
by: Steven T. Hatton | last post by:
I came across this while looking for information on C++ and CORBA: http://www.zeroc.com/ice.html. It got me to wondering why I need two different languages in order to write distributed computing...
0
by: Andy | last post by:
First of all, can I reassure you that this posting is NOT spam and not market research. Please feel free to email me at the address below to check/validate this message prior to doing the survey if...
42
by: John Smith | last post by:
In a C program I need to do exponentiation where the base is negative and the exponent is a fraction. In standard C this would be something like t = pow(-11.5, .333), but with this combination of...
0
by: natty2006 | last post by:
Submission Deadline extended: 13 November 2006 ************************************************************* IADIS INTERNATIONAL CONFERENCE APPLIED COMPUTING 2007 February 17-20, 2007 -...
13
by: Xah Lee | last post by:
Today, a motherfucker Christophe Rhodes (aka Xof in irc://chat.freenode.net/lisp ) kicked banned me. Here's the few relevant excerpt. (full, unedited excerpt will be published if there is a public...
14
by: Aaron Watters | last post by:
So, in between skiing runs I noticed a Business Week cover story on "cloud computing". The article had lots of interesting information in it like about how somebody's mom used to be an airline...
0
by: knorth | last post by:
The DataServices World conference offers a program for those interested in technology for data integration and data access, with emphasis on service-oriented architecture (SOA), web-oriented...
3
by: Ty Oft | last post by:
Hello Bytes! Maybe my question seems a bit silly (as one could simply answer it "Well, what are you more passionate about?" or stuff like that - please don't answer like this), but I am in a bit...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.