Giter Site home page Giter Site logo

deodeokos's People

Contributors

redundant4u avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

deodeokos's Issues

kTestFileIO() 오류

문제
ConsoleShell.ckTestFileIO() 함수 실행 중 테스트 오류 발생

  1. File Open Fail Test
  2. File Create Test
  3. Sequential Write Test(cluster size)
  4. Sequential Read And Verify Test(cluster size)
  5. Random Write Test
  6. Random Read And Verify Test
  7. Sequential Write, Read And Verify Test(1024 Byte)
  8. File Delete Fail Test
  9. File Delete Test

총 9번의 테스트를 진행하는데 간헐적으로 1, 3, 4, 9번이 Fail이 뜨는 현상이 발생

원인
파일시스템 구현 내용 중 버그가 있는 것으로 추측

kTestPerformance() 오류

파일 시스템 캐시를 주지 않고 kTestPerformance()함수를 수행하면 Sequential Read/Write Test(1 Byte) 테스트에서 Interrupt Not Occur 오류 메시지와 함께 함수 종료되는 현상이 나타남.

간혹가다 Cluster Size 테스트에서도 동일한 오류가 발생.

테스트 1 Byte 크기를 줄여도 동일한 오류 지속적 발생.

FileSystem.c 16 line

BOOL kInitializeFileSystem(void)
{
    BOOL bCacheEnable = FALSE;

    kMemSet(&gs_stFileSystemManager, 0, sizeof(gs_stFileSystemManager));
    kInitializeMutex(&(gs_stFileSystemManager.stMutex));

    // 초기화가 성공하면 함수 포인터를 하드 디스크용 함수로 설정
    if(kInitializeHDD() == TRUE)
    {
        gs_pfReadHDDInformation = kReadHDDInformation;
        gs_pfReadHDDSector = kReadHDDSector;
        gs_pfWriteHDDSector = kWriteHDDSector;

        // bCacheEnable = TRUE;
    }
    else if(kInitializeRDD(RDD_TOTALSECTORCOUNT) == TRUE)
    {
        gs_pfReadHDDInformation = kReadRDDInformation;
        gs_pfReadHDDSector = kReadRDDSector;
        gs_pfWriteHDDSector = kWriteRDDSector;

        if(kFormat() == FALSE)
        {
            return FALSE;
        }
    }
   ...

Screen Shot 2021-10-17 at 11 05 56 PM

캐시를 TRUE로 설정 후 테스트를 진행하면 오류 없이 진행.

kTestPerformance() 오류2

램디스크 사용을 위해 qemu-system-x86_64 -L . -m 64 -fda ./Disk.img -boot a -localtime -M pc -curses 명령어 실행하면 kInitializeFileSystem() 함수에서 진행되지 않는 오류 발견.

디버깅을 통해 FileSystem.c의 16번 라인부터 시작하여 HardDisk.ckInitializeHDD() > kReadHDDInformation() > kWaitForHDDNoBusy > kSleep(1)순으로 진행됨을 확인.

kSleep()에서 빠져나가지 못해서(데드락?) 콘솔 진행이 안되는 것으로 추측. 임시방편으로 kSleep() 함수에 kPrintf() 함수를 끼워넣어 kSleep() 함수가 영원히 자지 않도록 구성.

Commit 변경점

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.