Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Clocks/timers in modern computer  (Read 2990 times)

0 Members and 1 Guest are viewing this topic.

Block

    Topic Starter


    Greenhorn

    • Experience: Familiar
    • OS: Other
    Clocks/timers in modern computer
    « on: August 27, 2016, 09:39:51 AM »
    Hi, what are the different clocks and timers in modern standard computer ?

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Clocks/timers in modern computer
    « Reply #1 on: August 27, 2016, 01:48:54 PM »
    Clocks and Timers can be a number of things in computers.

    Clocks can be.... Clock Speed such as 700Mhz GPU and 4.2Ghz CPU, FSB 220Mhz of an overclocked system with 10% memory overclock, The clock you see in the corner system tray, internal system clock with date/time, and more

    Timers can be... scheduled tasks, scheduled updates, system behavioral parameters to abide by within a specific window of user usage such as a system that when idle crunches scientific data, but doesnt do this during a 8 hour window of user usage. Timing is also critical in video game design and software that requires delay timers to control the rate of execution in a powerful CPU and GPU system so that the games run at a constant speed which works hand in hand with a Real Time Clock function so that say a game that is running on a 800Mhz Pentium III will run at the same speed as a 4.2Ghz system vs 5 times faster game execution to where you are playing a game that runs fine on a 800Mhz system but it runs 5 time faster on a 4.2Ghz system and the game is then unplayable. (* Early games in the 8088 CPU era had issues like this running on the newer 286 and some 386 systems, and some had a Turbo button that could be used to change the FSB of the system so that for example a 12Mhz 286 could run at 16Mhz with the Turbo button enabled, but when running older games that run too fast, you can shut the Turbo button off and have it run at 12Mhz which is closer to the 4.77Mhz CPU that the game was designed to execute around.)

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Clocks/timers in modern computer
    « Reply #2 on: August 27, 2016, 02:08:07 PM »
    Is this Homework?
    The standard PC has timers in  hardware that make it easy to rime things exactly. These  are normally  used only by system programs.
    It would help if you could clarify your question.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Clocks/timers in modern computer
    « Reply #3 on: August 27, 2016, 05:07:43 PM »
    He's been in Chat 5 times...and yes...it's homework.
    " Anyone who goes to a psychiatrist should have his head examined. "

    Block

      Topic Starter


      Greenhorn

      • Experience: Familiar
      • OS: Other
      Re: Clocks/timers in modern computer
      « Reply #4 on: August 27, 2016, 05:12:59 PM »
      Thank you very much for these explanations, they help me to see more specifycally the thing. I talk about clocks and timers as pieces of hardware. I am creating an operating system from scratch in protected mode (x86), then i would like to know what are the different clocks and timers to correctly imagine the plan of this os and all its possibilities.

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: Clocks/timers in modern computer
      « Reply #5 on: August 27, 2016, 05:14:55 PM »
      Good Luck with that...
      " Anyone who goes to a psychiatrist should have his head examined. "

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Clocks/timers in modern computer
      « Reply #6 on: August 27, 2016, 07:19:09 PM »
      Good Luck with that...
      It will be an uphill struggle.
      The modern PC gets an interrupt about 18 times a second. This put a severe limit on the accuracy of timing. Any OS has to  account of this detail.

      Block

        Topic Starter


        Greenhorn

        • Experience: Familiar
        • OS: Other
        Re: Clocks/timers in modern computer
        « Reply #7 on: August 28, 2016, 06:02:01 AM »
        It will be an uphill struggle.
        The modern PC gets an interrupt about 18 times a second. This put a severe limit on the accuracy of timing. Any OS has to  account of this detail.

        What is component doing this interrups about 18 times a second ?
        « Last Edit: August 28, 2016, 06:48:43 AM by Block »

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Clocks/timers in modern computer
        « Reply #8 on: August 28, 2016, 09:12:55 AM »
        Please do some research on your own. This is old information as s part of the fundamental substructure the original PC hardware design.
        Quote
        INT 08H: Timer Interrupt

         This hardware-generated interrupt (IRQ 0) is executed upon each tick of
         the PC's real-time clock.  The clock ticks every 55ms, or about 18.2 ticks
         per second.

         The ROM-BIOS (default) code for this interrupt updates the clock values at
         0:046c.  It also turns off the diskette drive motors after about 2 seconds
         without read/write activity.  See BIOS Data Area for other variables.

         If you want to use this interrupt for custom timer-keyed activities (as
         with a TSR program) you must be sure to include the code that tells the
         system when the interrupt is finished.  The magic sequence is:

                  mov     al,20H     ;send End-Of-Interrupt signal
                  out     20H,al     ; to the 8259 Interrupt Controller

         Most TSRs let the default code do this.  For instance, when the TSR is
         installed, the original vector is saved in a variable named cs:[old_int8].
         Then the following code is executed on each INT 08H:

                 pushf                            ;simulate an INT
                 call  dword ptr cs:[old_int8]    ;perform normal timer actions
                 cmp   cs:my_var,test_value       ;now do customized stuff
             ... etc. ...
                 iret    ;return to interrupted foreground application program

        ��CPU Exception Interrupt��
          286+ computer execute INT 08H when encountering a Double Exception Error
          (an exception while processing an exception).

        See Also: IRQs: Hardware Interrupts
                  Timer Ports
                  TSR Functions
                  ROM-BIOS Functions
                  DOS Functions
                                            -*-
        http://webpages.charter.net/danrollins/techhelp/0105.HTM
        You need to read a book. Or study source code.
        https://www.amazon.com/PC-Interrupts-Programmers-Reference-Third/dp/0201577976/ref=pd_sim_14_2?ie=UTF8&psc=1&refRID=J8FZBPTDGK4MMV1G9BGJ