Nachos - MODULE TITLE Operating systems Tutor Name P rof...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
MODULE TITLE Operating systems Tutor Name: Prof Marcos Rodrigues Assignment:-NACHOS REPORT Assignment Submitted By: Student Name: VIJAYA PAVAN REDDY NARASAREDDYGARI Student ID: 18032246
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Nachos Overview Not Another Completely Heuristic Operating System or NACHOS is instrumental software which is developed at Berkley by Tom Anderson and his students. NACHOS is mainly used for educational purpose, which is used demonstrate the operating system concepts such as Thread management Multi processing File system Virtual memory Networking etc…. Directory structure of NACHOS Explanation for NACHOS directory structure
Image of page 2
Bin : bin contains source code of coff2noff which is used for converting data into nachos object file format which are used by user programs of nachos Filesys : File system in nachos comes with two version “real” and “stub”. The stub system uses UNIX system file system operations where NACHOS is running. The real system is built on disk simulator which is simulated using UNIX file system. Lib : Nachos uses utilities here Machine : this is used for simulation. Network : supporting files for networking are given here for NACHOS which is implemented in post office format. Test : Tests directory contains files of user test programs to run on simulatation machine. It contains its own makefile .the test programs are written in c. Threads : nachos is multi threaded system .the files required for performing of thread operations are present here Userprog : files used for supporting of user programs are present here such as loading of user program, running of test programs on simulated machine. It also contains exception.cc for handling of exceptions. Multi threading Normally many operating systems use concept of threads which are also called light weight processes .Normally a process will contain several threads and these threads use the same addresses space .Threads are some way similar to that of processes. Threads can be in different states such as Ready Running: blocked just created Nacho is provided with set of thread package which is provided in … /nachos/threads directory. This package allows us to create threads, switch control among threads, terminate threads etc… Threads perform different operation such as fork, yield, sleep, finish, begin…. The operation of are given below Fork : Fork is used for creating a new thread by forking a thread object. Implementation of for can be taken place in steps as Stack allocation, stack implementation and placing the thread on ready queue The piece of code given below is used for forking procedure void
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Thread::Fork(VoidFunctionPtr func, void *arg) { Interrupt *interrupt = kernel->interrupt; Scheduler *scheduler = kernel->scheduler; IntStatus oldLevel; DEBUG(dbgThread, "Forking thread: " << name << " f(a): " << ( int ) func << " " << arg); StackAllocate(func, arg); oldLevel = interrupt->SetLevel(IntOff); scheduler->ReadyToRun( this ); ( void ) interrupt->SetLevel(oldLevel); } Yield: If any thread is ready to run then this operation is performed to relinquish the CPU.so that it is rescheduled.
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern