Okay, so let's talk a little bit about computer architecture
and we're not gonna get really deep into this. This isn't an A plus class where we're gonna count the pens on processors and so on. But we are gonna understand some of the basic elements, especially focusing on the processor and memory.
So when we talk about the central processing unit, we would look at ideas like with the arithmetic logic unit, the control unit, the registers of the CP with those elements do. And then we would also talk about memory. We talk about primary memory. We talk about secondary or primary storage and secondary storage.
Talk about volatile versus non volatile,
and then we'll also talk about cash. So when we start off and look at the architecture of a CP, you have to understand the four main modes or cycles or functions, if you will, of the CPU. So we have fetch, decode, execute in store.
So we start off with fetch. And this is where the control unit the control unit, goes to memory
and essentially retrieves the instruction from the application.
Now, sometimes you'll hear about pre fetching, and that's when cash goes out on anticipates the need of the processor. But ultimately with fetching the control units, going to memory and retrieving the instructions, those instructions have to be decoded. And that's what the control unit does.
And then since the data to the arithmetic logic unit,
the A L U performs the mathematical logical function. Whatever the operation of the data, it looks like there's a little typo. It says the L U and the ale you perform. So this could be it should be the control unit and A ll you perform the mathematical or logical operation on the data
and then storing the l. U is gonna store whatever the result of that operation is in memory or more specifically, and perhaps more likely in a register. So the register is an area very, very high speed memory that's to be used by the process.
Now, when we talk about executing instructions or execution types, perhaps this is easiest to see when we talk about operating systems. And since many people kind of grew up in the Microsoft Windows environment, I'm gonna use windows for an example Here,
um, we started out If you go back to the days of dolls and specifically Windows 3.1. Windows 3.1 gave us the illusion of what we call multi programming
and multi programming means. It appears as if we have more than one application open at once. And if you go back to Windows 31 you could have XL open and you could have a word open at the same time.
But the problem wa, since there was no true isolation of these different processes, even though they could both be open on Lee one was really running. So if I was in Excel, I couldn't be downloading a file in the background from Internet Explorer writer. I couldn't be running a query
in access while I'm typing out a letter in word.
So there really wasn't the ability to run both programs at times. At the same time, it just looked like broke. Both programs were open and again, that goes back to the fact that there was new, no true isolation of processes.
Well, when we move from Windows 312 Windows 95 what we got was called multitasking and multitasking meant yes, we're actually running multiple programs at the same time and as a matter of fact. Multi programming used to be referred to as cooperative multitasking,
and the reason it was called cooperative multitasking
is because there was no isolation across the processes. Each application had to be well written and had to do its part in releasing. Its resource is releasing its memory. It had to be written to cooperate with the other applications. Otherwise, you would have system lock ups and all kinds of problems.
So when just 31 really is a true multi programming environment,
it could have also been referred to his co operative Multitasking.
Now preemptive is true multitasking because what happens in the perimeter of the pre emptive multitasking environment is each application is given its own set of resource is each application has given its own stack of memory its own time slice with the processor,
its own access to configuration files, whatever it needs.
So that way, if an individual application needs to be terminated because it operates in a very particular and very specific address space, that application or process can be terminated individually. If you go back to the Windows 31 days, they did support the control delete feature,
but all control all the week did in multi programming environments
that rebooted the entire system. Once we moved to Windows 95 we could then shut down individual programs and restart, then, because we have that isolation. So isolation of processes is huge. When we talk about system architecture, okay, multi threading. So
within each process, there are a series of functions that can be run,
you know, within word you can print at the same time. You can change orientation that you could input. Fond. You could color forms do all these different things, those air each threads.
Now multi threading has happened a couple of different ways. First of all, traditionally, the handle multiple threads.
we would have a multi threading operating system.
What that means is the OS was capable of handling more than one thread at the same time. But the problem was, the hardware still was not able to multi thread.
So one of the ways that we could get multi threading both hardware and software level was we could add additional processors. So if you ever worked on symmetric multi processing system that had more than one processor have eight processors, 32 process or 64 processors.
When you add, there's additional processors, you can now multi thread
at the hardware level.
However, that could be very cumbersome and very expensive. So today, when we look in our processors, we have the dual core processors. We have the quad core processors.
Those multiple cores are there for the purpose of being able to multi threat.
So we've had multi threading operating systems for years. But just now are we able to catch the hardware up with what we could do with the software? If that makes sense, all right, next piece to talk about the move, the modes of the CPU. So let's say I'm an administrator
and I also do other functions on the network. So I come in at 8 30 in the morning.
Do I sign on as network administrator and perform all my tasks throughout the day, logged in his administrator and then log out at five o'clock in the afternoon?
I'm not gonna do that because that's too vulnerable. That leaves an administrative account connected to the network all day when 90% of the things I need to do don't require administrative access.
It's the same idea with modes of the process.
The processor has exclusive and full access of a system through a mode called privileged mode that motives sometimes refer to his kernel mode as well.
But the processor to maintain all of its functions throughout the entire day as working in privilege mode is too vulnerable there. Too many capabilities in privilege move.
So the CPU also has the means of stepping back its level of authority to a mode called Problems state or User state mode. I think that's funny that user and problems state here. Signature are synonymous. That kind of tells you where maybe our problems come from.
But the idea is in user state.
The processor doesn't operate with elevated privileges.
So again, it's kind of like that idea of an administrator having a regular user account, but also being able to raise those privileges for higher authority if necessary.