Os

Status
Not open for further replies.

_Insomnia_

Beta member
Messages
3
What`s happening before the Windows or Linux or other OS boots? I meen how the boot process works?
What kind of test, programs load in memory and what data are consulted from the harddisk before an operating systems starts booting?
And if you know whats happening after that step feel free to tell me please.
Thank you.
 
http://computer.howstuffworks.com/operating-system4.htm
Wake-Up Call

When you turn on the power to a computer, the first program that runs is usually a set of instructions kept in the computer's read-only memory (ROM). This code examines the system hardware to make sure everything is functioning properly. This power-on self test (POST) checks the CPU, memory, and basic input-output systems (BIOS) for errors and stores the result in a special memory location. Once the POST has successfully completed, the software loaded in ROM (sometimes called the BIOS or firmware) will begin to activate the computer's disk drives. In most modern computers, when the computer activates the hard disk drive, it finds the first piece of the operating system: the bootstrap loader.

The bootstrap loader is a small program that has a single function: It loads the operating system into memory and allows it to begin operation. In the most basic form, the bootstrap loader sets up the small driver programs that interface with and control the various hardware subsystems of the computer. It sets up the divisions of memory that hold the operating system, user information and applications. It establishes the data structures that will hold the myriad signals, flags and semaphores that are used to communicate within and between the subsystems and applications of the computer. Then it turns control of the computer over to the operating system.

The operating system's tasks, in the most general sense, fall into six categories:

Processor management
Memory management
Device management
Storage management
Application interface
User interface

While there are some who argue that an operating system should do more than these six tasks, and some operating-system vendors do build many more utility programs and auxiliary functions into their operating systems, these six tasks define the core of nearly all operating systems. Let's look at the tools the operating system uses to perform each of these functions.
 
ok well !! i know most of this part you said!! i know the data structures and BIOS etc .. but wht i dont know is what you said below
It establishes the data structures that will hold the myriad signals, flags and semaphores that are used to communicate within and between the subsystems and applications of the computer.
i would be glad if you took the time to explain a bit more. thanks and c ya!!!
 
that are used to communicate within and between the subsystems and applications of the computer.

it handles to transfer of information from the physical layer of the mobo ops to the application layer of the os.

aka it takes the 1s & 0s from the mobo and translates it to a software language
 
csamuels said:
it handles to transfer of information from the physical layer of the mobo ops to the application layer of the os.

aka it takes the 1s & 0s from the mobo and translates it to a software language

I wouldn't say that this is an accurate description of what was being described in the article.

Signals, semaphores, and flags are used for inter-process communication within an operating system.

They are basically all similar forms of the same thing, so I'll just describe what a semaphore is in general.

If you have two threads (or processes) that need to access the same shared resource, there must be a way to arbitrate which thread may access the resource at which time.

The simplest form of semaphore is the binary semaphore which is always either in a locked or unlocked state.

Consider two threads, Thread A and Thread B, which both want to access some common memory locations X and Y.

Thread A wants to execute:
Y = X + 2
X++

Thread B wants to execute:
X++
Y = X + 2

Now, without semaphores, the order in which these statements are executed is critical to the result.

Assume X initially equals 1.

If Thread A executes entirely before Thread B, then when thread A completes, the value of X will be 2, and Y will be 3. When Thread B completes subsequently, the value of X will be 3 and the value of Y will be 5.

Now, if Thread A is interleaved with Thread B such that the statements are executed A1, B1, A2, B2, the values at the end will be X = 3, Y = 5.

Now interleave them the other way. B1, A1, B2, A2. The values will be X = 3, Y = 4.

Clearly, the results of this execution are unpredictable, and thus unacceptable. If calculations depend on the result of these two small code sections, bugs could be introduced based on subtle timing variations.

Semaphores introduce the concept of the 'atomic operation'. Normally an operation like X++ is actually executed as Temp = X, Add Temp, X, X = Temp. Therefore, this operation could actually be interleaved in any number of unpredictable ways. In order to make these operations 'threadsafe' binary semaphores allow the programmer to ensure that this cannot happen.

Now, you would have the concept of something called a critical section, which is the section of a thread that accesses shared memory.

Therefore you have:

Code:
// Some non-shared code
Request Semaphore
If successful
   // Critical section
   // Release semaphore
Else
   // Wait until semaphore is released
   // Request semaphore
// Some non-shared code

Does any of this make sense?
 
Status
Not open for further replies.
Back
Top Bottom