Transcript for:
Basic Concepts of Computer System Operations

In the last lecture, we have started studying about operating system and we also saw the introduction of operating system. We saw what an operating system really is, what it really does and we have also seen the functions of operating systems and we have also seen some basic examples of operating system. Now, in this lecture, we will be seeing some of the basic concepts that you need to know before we really go into the details of operating system.

In this lecture, we will be mainly studying about computer system operations. So, basically it is about the structure of computer system. Now, why I am doing this is because some basic knowledge of the structure of computer system is required to understand how operating systems work.

So, by studying about this structure of computer system, this will provide you a base for understanding operating system. So, instead of directly diving into how operating system works, We should have a base about this so that it will help us to understand in a clearer way about operating system. So, after studying this, when you study each and every concepts of operating systems, you will not feel completely blank but you will have a proper idea of why we are doing this or why certain things working in that way. And not only that, by having a basic introduction to this structure of computer system, you are getting a basic introduction to computer organization. and architecture which is an important course as far as computer science and electronics is concerned.

Alright, so now let us see what we can study from this computer system operation in this lecture. So, here it says a modern general purpose computer system consists of one or more CPUs and a number of device controllers connected through a common bus that provides access to shared memory. So, Don't worry about this definition. It will become clear as I show you a diagram related to this. And we will see what this actually means.

So, here I have a diagram which we can use to explain this sentence that is written here. So, let us break this sentence into parts and see what each lines mean. A modern general purpose computer system consists of one or more CPUs.

Now, what do we mean by this? A modern general purpose computer, it consists of one or more central processing units. Now, what is a CPU? CPU is the main part or we can call it the brain of the computer system.

It is the processing unit. That is where all the computations and processing and calculations take place in a computer. Now, when we mostly talk about CPU, what comes to our mind? Usually, as a novice, what comes to our mind is that big box beside your desktop that you have.

And that is what we generally think. a CPU is. We just look at it and we call it that this is the CPU.

But that box is not just a CPU. That box consists of many things like your motherboard, your CD-ROM, your USB ports, many things are there. But CPU is just a small chip that is there embedded into your motherboard.

And that small chip is responsible for performing all the computations and calculations. And that is your actual CPU. So, that box itself you can just call it a cabinet.

But the CPU is just a small unit that is present inside that box which is there in your motherboard. Alright, and then the modern computer systems it may have one or more CPUs depending on the processing power of your computer. So, that is the meaning of the first line.

And a number of device controllers connected through a common bus that provides access to shared memory. So, here if you look in this diagram, we have some Hardwares like your disk which may be your hard disk or anything like that. And then we have some more hardwares here like your mouse, keyboard, printers.

And then you have your monitors over here. So, it is not limited to this but this is just an example I am showing you. And then each of these hardware or devices are connected to a controller. And this controller is responsible for the way these devices work. So, here for example we have the disk which is connected via the disk controller.

And then these devices here like your mouse, keyboard and printers assuming that they are all USB devices. They are connected to the USB controller. Because these are connected to the USB ports and the USB controllers will take care of how these devices perform.

And then you have your monitor that is your display and that is connected to a video adapter. And these adapters or controllers are responsible or they are in charge of how these devices actually work. And then the CPU, we have it here, the central processing unit, along with these controllers are connected via a common bus that we have here. This line over here, it represents the common bus. This one which we talked about.

And we see that they are all connected to this bus. It is common to all of them. And that bus is connected to a shared memory.

Alright, let us see about this in more detail. So, here I have some points written down. Each device controller is in charge of a specific type of device.

So, here we have device controllers. And each of these controllers or adapters they are in control of a specific kind of device as it is shown here. And then...

The CPU and the device controllers can execute concurrently competing for memory cycles. Now what do we mean by this line? So we see that they are all connected to a memory controller over here.

And why is that? That is because I already taught you in the first lecture that whenever something has to be executed or whenever something has to be loaded it has to be loaded into your main memory. Your main memory is like your RAM, random access memory that you have. And don't worry if you don't know about it in detail.

I will do another lecture where I will be explaining about the storage and memory that we have. So, just know that whenever something has to be executed, it has to be loaded into your main memory. And your main memory is not unlimited or infinite but it is limited. It is a finite amount of memory that you have.

Like in your laptops or in your desktops, you may have 2 GB of RAM or 8 GB of RAM. So on and so forth. So depending on the... size of your RAM that is the amount of memory or the main memory that you have.

And whenever you execute something that has to be loaded into your main memory. And now we see that all these devices in order to work they need to be loaded into the main memory for any execution that has to be performed. And then the disk controllers or the adapters are taking care of this. And disk has to be loaded into the main memory. And we see here that all these device controllers along with the CPU can execute concurrently.

Now, what do we mean by concurrently? Concurrently means that all these devices or controllers can execute all at the same time. Now, let's take an example. Suppose you are watching something like let's say a video or a movie in your monitor. And at the same time you can minimize and type something using your keyboard onto your Microsoft Word.

Now, when you do this, you don't experience a lag. You never experience a lag like When you are typing something, your video get paused or something like that. You never experience.

Why? Because they are all working concurrently. They are all working at the same time.

That is how powerful your system is. And that is where you have to appreciate the beauty and power of your system. Now, in order to make all this work seamlessly without having any lag or having any problems, what do we need? To ensure orderly access to the shared memory, a memory controller is provided.

whose function is to synchronize access to memory. So, as I already told you, all these devices need access to the memory because they all have to be loaded to the memory in order to work. And now we need to ensure that all of these devices get their required share of memory so that they can be loaded correctly and they can be executed in the right way without having any problem for the user. So... What we have is a memory controller.

So, we have a memory controller here which ensures that every controller or every other controller or devices gets the proper access to the memory that they need so that they can perform or work smoothly without having any problems. So, the memory controller synchronizes everything and makes everything work in a very smooth way. So, that is what we can understand by this diagram. And from this diagram we can understand the basic structure of how things are arranged.

So, So first we have the CPU and then the CPU along with the disk controllers which are responsible for the working of each and every devices like I have shown here. They are all connected via a common bus. This line represents the common bus and that is connected to the memory controller which takes care of how the memory has to be shared between each and every devices so that its working is proper and smooth. Alright now I want to introduce some important terms to you. You have already seen the structure of a computer system.

Just the basic structure using that diagram. And now I want you to know these terms which we are going to study here right now. The first one is known as a Bootstrap program.

So, what is a Bootstrap program? The initial program that runs when a computer is powered up or rebooted is known as a Bootstrap program. So, Bootstrap program is the first program that is executed or that runs when you power up or reboot your computer. computer system.

So, when you go and press the power button of your computer the first program that loads, that helps in powering up the system is known as the bootstrap program. Now let us see what are the features of this bootstrap program and what are its functions. So, the bootstrap program is stored in the ROM.

ROM stands for Read Only Memory which is a kind of secondary memory. So, your bootstrap program is stored in your ROM and then it must know how to load the OS and start executing that system. So, as I told you, bootstrap is the first program that loads when you power on your system. And that program, what is its function? It must load your operating system.

Your operating system is the interface between you and the physical hardware. So, your operating system also is a software. It is kind of a system software.

So, that operating system, it is already residing or it is stored somewhere in your secondary memory and then the bootstrap program must know how to load that operating system and start it for you. And also I told you that operating system is stored somewhere in the secondary memory. So the bootstrap program must know where your operating system is stored and it must go there and it must invoke the operating system and it must load the OS kernel into your main memory. It must locate and load into memory the OS kernel.

What do we mean by kernel? Kernel is like the heart of the OS. It is the main part of the operating system. So, that has to be loaded into your memory. And then the bootstrap program, as you switch on your computer, it is the first program that is run and it goes and finds where is your operating system.

And then the kernel of your operating system, it takes it and it loads into the memory so that the operating system will come live. And after that, the rest of the things the operating system will take care of. So, that was about the Brute Strap Program.

Now, the next thing that I want to introduce to you is something known as an Interrupt. So, let us see what an Interrupt is. So, what comes to your mind when you hear the word Interrupt? So, in English we know what is an Interrupt. When you are doing something, if someone comes and disturbs you or if someone comes and says please stop doing this work and do something else.

That is an Interrupt. We are interrupted. So, think of it in the same context. This is almost the same even in case of a computer system. And let's see what or how we can define this and what it actually is.

So, the occurrence of an event is usually signaled by an interrupt from the hardware or software. So, we know that the CPU is always working. It is doing some work.

And when the CPU is doing that work, sometimes the hardware or software may interrupt the CPU. It may come and tell the CPU that wait. Just wait with whatever you are doing and please execute this task that I am giving you. This is more important. So, the CPU has to stop and it has to execute that task which comes up.

And that is known as an interrupt. So, the hardware may trigger an interrupt at any time by sending a signal to the CPU. Usually by the way of the system bus. So, we have different hardware in our system. And then that hardware can trigger an interrupt.

It can interrupt and how does it do that? It sends a signal to the CPU. And how can it send signal to the CPU? By the way of a system bus. Through the system bus.

I showed you in our previous diagram what I mean by bus. So, here this line represents the common bus we have. So, similarly using a system bus, the hardware can send the interrupt to the CPU.

And the CPU have to stop whatever it is doing and it has to execute the interrupt. So, we will see how the CPU responds to the interrupt later. So, Let us understand what is meant by interrupt in that way. Now the next term I want to introduce to you is known as a system call also known as a monitor call.

Let's see what it says. A software may trigger an interrupt by executing a special operation called a system call. Now as I told you when a hardware triggers the interrupt we usually called it as interrupt.

If the software is what that is triggering the interrupt. If the software is causing the interrupt then that is known as a system call or a monitor call. So, if it is a hardware, we usually call it an interrupt or if it is triggered by a software, then we usually call it a system call or a monitor call.

So, I hope that made clear to you what an interrupt actually means. Now let us see how does the CPU respond when it receives an interrupt. So, here it says when the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed location.

So, I already told you how interrupt can arise either from hardware or software. So, CPU is already doing some work and then immediately it gets an interrupt from either a hardware or a software. So, when the CPU is interrupted in that way, what does it do?

It stops what it is doing. It stops what it was doing and then it immediately transfers execution to a fixed location. So, whatever the CPU was doing, it just stops it and then it transfers its execution to a fixed location. Now, what is that fixed location that we are talking about?

The fixed location usually contains the starting address where the Service routine of the interrupt is located. Now we have a new term here which is called service routine. Now what is a service routine?

Service routine is nothing but it is something where what the interrupt actually wants to do is written. So, let's not go into the technical details. I will just tell you basically what it means.

When an interrupt arises, there is something that the interrupt wants to do. So, there is something that the interrupt wants to do, something it wants to execute. So, So what actually has to be executed or what actually the interrupt wants to do that is written in the service routine.

So every interrupt has its service routine known as the interrupt service routine. Sometimes it is known as ISR. So when the CPU is interrupted, it stops what it is doing and it immediately transfers its execution to the starting address of the interrupt service routine.

So. The interrupt service routine may be located somewhere and it has a starting address from where it should start its execution. So, the CPU stops what it was doing and it transfers its execution to the starting address of the interrupt service routine.

So, that is the first thing that the CPU does when it is interrupted. And then what happens? The interrupt service routine executes.

So, whatever was written in the interrupt service routine gets executed completely. And then what happens? On completion, The CPU resumes the interrupted computation. So, we know that the CPU was already doing something before.

So, when the interrupt arose, what it did? It transferred its execution to the interrupt service routine. And then it executes it and when it is done, once the interrupt service routine executes completely, then the CPU can go back from where it came from.

The execution of the CPU goes back to where it came from and it resumes whatever it was doing. So, this is how the CPU responds to interrupts. And I hope that made it clear to you how an interrupt is handled by a CPU.

At least the basics. So, this was just a basic introduction to computer system operations. So, I will not go into great detail because this is just the basics that you need to know before you really understand the details of operating system.

So, I hope this was clear to you. In the next lecture, we will be seeing about storage structures and about memory which is also an important topic that you need to be knowing for understanding your operating system. So, thank you for watching this and see you in the next one.