Page 1 of 1
can anyone help please...(urgent)
Posted: Tue Jun 03, 2008 1:12 am
by arunkumar
hi,
i would like to have the information of exactly how a file/program is stored in secondary memory? how it is then loaded into main memory and how execution actually take place there?
i have the basic understanding of scheduling, paging and segmentation but i want an example (or theory) which clearly tells how a program is executed in the main memory? like (code segment data segment ........what and all will be loaded of a file when it is to be loaded into the pri mem)
i would appreciate replies as early as possible
Posted: Tue Jun 03, 2008 1:22 am
by JamesM
@Mods: Wrong subforum - likely only to get flames here.
If u really want theory
Posted: Tue Jun 03, 2008 2:03 am
by DeletedAccount
If you really want theory , just take a look Maurice J Bach , Design of the Unix Operating System . Read File Systems Chapter on Andy S Tanenbaums Book and Dinosour book . Try Nachos and OS -161 - they are great to learn theory . Also please try to solve the exercise too ...
Regards
Sandeep Mathew
Posted: Tue Jun 03, 2008 2:06 am
by DeletedAccount
As a side note : people here treat u with scant repect if you havent done much reading . Just make sure u read before posting
Posted: Tue Jun 03, 2008 2:11 am
by Combuster
Urgent?
What the heck
If you are on a school deadline or something then let us take it easy - the exercise exists for a reason.
As for the actual question: You can do paging, scheduling and everything, and you *do not know* how a program works? Either I'm completely missing something or you should really elaborate on what exactly you can't figure out.
Re: can anyone help please...(urgent)
Posted: Tue Jun 03, 2008 4:20 am
by jal
arunkumar wrote:i would like to have the information of exactly how a file/program is stored in secondary memory? how it is then loaded into main memory and how execution actually take place there?
You mean by 'secondary memory' a storage device (e.g. hard drive), and by 'main memory' the RAM I assume? Anyway, that of course depends on the operating system, the file system used and the executable format used. There is no 'exactly', there are a myriad of OSes and different fs/exe formats.
In general though, an executable on disk (or another storage device) consists of the actual program code, any predefined data it needs, and an executable header (that's the header of the executable, not a header that
is executable, of course) that tells the operating system everything it needs to load the code and data, and to start running the code. Usually an OS part called a 'loader' will do the actual reading from disk, create the right environment and tell the OS to schedule the code for running. As for execution, it doesn't take place in the memory of course, but inside the CPU.
JAL