Thread: dumb question...

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    dumb question...

    Ok, I have a real dumb question. When a program is run, it CANNOT do so from within the hard drive - right? Then from where? RAM??? These old books keep referring to "core" memory versus "disk". Where is this core memory?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    Normally when a program is launched, it is loaded into RAM.

    The terms core memory v disk memory may be referring to the technique of using the disk as if it were RAM. Windows does this all the time - it's swap file. This is now called virtual memory rather than disk memory.

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Depending on how old your book is, it may, indeed, be refering to core memory. Core memory was a solid state RAM based on very small ferrite toroids which could be magnetised. The magetisatin sense was read back via a sense wire. The core memory modules were quite bulky by todays standards, but were a great leap forward at their time, (1960's). I have a core module from a Control Data Cyber 605 computer. It is a 4k module and the size of a show box.

    Core memory still has some uses, it is, for example, static, i.e. you can pull the power off it, and when reapplied, it will still contain it's information. Another useful feature for some people, is that it is nuclear hard, i.e. the contents retain fidelity after the electro magnetic pulse of a nuclear exlosion.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Hmmm...thanks. Ok Davros, let's clarify - so you CAN run a program directly within the hard drive? That seems counter - intuitive. If you are referring to swapping pages, that is different. The pages on the hard drive must be placed in the core/RAM memory before they can be accessed, correct? An if so, why? Is it because the seek time is intolerably slow to feed to the CPU, or is that there is an actual hardware inability to do so ( run the program from disk )?


    [edit] BTW Adrianxw: yes this book is dated 1974(!) but, I should add, it is an excellent book. These old-school programmers sure took programming seriously! Unlike todays brand of impatient and eccentric coders, these guys could even write programs without mnemonics and using absolute addressing to boot! Truly amazing...[/edit]
    Last edited by Sebastiani; 07-28-2002 at 10:46 AM.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. dumb question
    By travis999 in forum C Programming
    Replies: 3
    Last Post: 10-26-2007, 12:57 AM
  2. very dumb question.
    By Blips in forum C++ Programming
    Replies: 14
    Last Post: 11-08-2005, 09:37 AM
  3. Dumb question
    By dragon2309 in forum C Programming
    Replies: 18
    Last Post: 10-29-2005, 03:27 PM
  4. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  5. another dumb question - loop not working?
    By Captain Penguin in forum C++ Programming
    Replies: 8
    Last Post: 10-06-2002, 10:15 PM