
1. What's an operating system?
Remote connection
In this lesson, we're going to learn about remote connection. SSH or secure shell is a protocol implemented by other programs to securely access one computer from another. To use SSH, you need to have an SSH client installed on the computer you're connecting from along with an SSH server on the computer you're trying to connect to. Keep in mind that when we say SSH server, we don't mean another physical machine that serves a data. An SSH server is just software. On the remote machine, the SSH server is running as a background process. It constantly checks if a client is trying to connect to it, then will authenticate its requests. The most popular program to use SSH within Linux is the OpenSSH program.
For now, let's just talk about what happens when you use SSH. Now that we're connected through SSH, any of the text commands that we type are sent securely to the SSH server. From here, you can even launch an application, they'll let you see a GUI instead of working directly in the shell.
We can connect to SSH using passwords. This way of authenticating to remote machine is pretty standard, but it's not super secure. The alternative is using an SSH authentication key. SSH keys come in a set of two keys called private and public keys. You can think of them as actual physical keys to a special safe. You can use one key to lock the safe, but it won't unlock it. The other key can then only unlock the safe, but not lock it. That's basically how public and private keys work. You can lock something with the public key, but you can only unlock it with a private key and vice versa. This ensures that whatever is in the safe is available to only those with the public and private keys.
Another way that you can connect securely to remote machine is through VPN. A VPN is a virtual private network. It allows you to connect to a private network like your work network over the Internet. Think of it as a more sophisticated SSH with a lot more setup. It allows you to access resources like shared file servers and network devices as if you are connected to your work network.
https://devblogs.microsoft.com/powershell/looking-forward-microsoft-support-for-secure-shell-ssh/
Looking Forward: Microsoft Support for Secure Shell (SSH) - PowerShell Team
[UPDATE]: Read more about our detailed plans, roadmap, and where you can play with the in-progress code here. As Microsoft has shifted towards a more customer-oriented culture, Microsoft engineers are using social networks, tech communities and direct cust
devblogs.microsoft.com
Components of an Operating System
An operating system is the whole package that manages our computers resources and lets us interact with it. There are two main parts to an operating system, the kernel and the user space. The kernel is the main core of an operating system. It talks directly to our hardware and manages our systems resources. As users, we don't interact with the kernel directly. Instead, we interact with the second part of an operating system the, user space. The user space is basically made up of everything outside the kernel. The users thinks that we interact with directly like system programs, user interfaces, etcetera. When we say operating system, we're talking about both the kernel and the user space.
There are hundreds of operating systems out there, but we'll focus on the major ones used in IT; Windows, Mac, and Linux. The Windows OS is developed by Microsoft and used widely in the business and consumer space. Most PCs you buy come with windows as the default operating system. The Mac OS by Apple, is mainly used in the consumer space. If you buy an Apple computer, it'll come with Mac OS preloaded. The last operating system we'll dive into is the Linux operating system. Linux is an open source operating system, which means its software is free to share, modify, and distribute. Linux is used heavily in business infrastructure and in the consumer space. Linux itself is actually a kernel developed by Linus Torvalds. Because of the way it evolved, we call the Linux kernel the Linux operating system. Today, Linux has become a huge community effort with developers all over the world contributing to its success. Because Linux is open source, lots of different organizations package their own version of it. Operating systems like Windows or Macintosh on the other hand, are solely developed by their respective companies. We call these different Linux OSes distributions. Some common Linux distributions are Ubuntu, Debian, and Red Hat. Another operating system that has started to gain popularity is Chrome OS, but we won't go into detail on that one. You can read more about it in the supplemental reading.
The basic rundown of the main functions of the kernel;
- file management
- process management
- memory management
- I/O management.

https://ko.wikipedia.org/wiki/%ED%81%AC%EB%A1%ACOS
크롬OS - 위키백과, 우리 모두의 백과사전
위키백과, 우리 모두의 백과사전. 삼성 크롬북 크롬OS(영어: ChromeOS)는 크롬박스 및 크롬북에 탑재된 독점 유료 운영 체제이다.[5] 크롬OS는 설치용 이미지파일(.iso)이 제공되지 않으며, 정품 크롬OS
ko.wikipedia.org
Files and File Systems
Imagine if you had to store a single file in a cabinet. That's not so bad, right? What if, instead of one file, you had to store 100,000? Can you see a problem here? Well, on our computers, we can easily store hundreds of thousands of files, Problem solved? Not quite, we have to be able to keep track of all these files. The kernel handles file storage and file systems on our machines. There are three main components to handling files on an OS, the file data, metadata, and file system.
Let's start with the file system. When we have a brand new hard disk that we want to store data on, we need to erase and configure the disk. This way our operating system can read and write data to it. This is important, since it's how our operating system keeps track of files. So it must know what kind of file system is used.
There are lot of file systems, and they're used for different purposes. Some file systems support the storage of large amounts of data, others only support small amounts. They can operate at different speeds, and have varying resiliency towards file corruption, and so on. We won't get into which file system is best. That's for you to decide. But the major OS manufacturers have their own unique file systems that they recommend. For Windows, the major file system that's used is NTFS. It was introduced in the previous version of Windows OS, Windows NT. And it includes many features, like encryption, faster access speeds, security, and more. Microsoft is developing another file system called ReFS, but it isn't quite ready for consumer use just yet. For Mac OS, the default file system is APFS. It's journaled, which means it does a better job at saving your disk state in case of a failure. This is a feature on other types of file systems, like NTFS. For Linux, different distributions will use different file system types. A standard for file systems for Linux is ext4, which is compatible with older ext file systems. In general, different file system types don't play nicely with each other. You might not be able to easily move files across different file systems, depending on the file system type. A good guideline to use is just to use the file system that your operating system recommends. Another important part of file management is the storage of actual file data. We write data to our hard drive in the form of data blocks. When we save something to our hard disks, it doesn't always sit in one piece. It can be broken down into many pieces and written to different parts of the disk. Block storage improves faster handling of data because the data isn't stored on one long piece and it can be accessed quicker. It's also better for utilizing storage space.
Lastly, we need to keep the metadata that contains the information about our file. There's a lot of information about our file that we want to know, like who created it, when it was last modified, who has access to it, and so on. The file metadata tells us everything we need to know about our file. It also tells us what type of file it is. A file extension(확장자) is the appended part of a filename that tells us what type of file it is in certain operating systems. Take cool_image.jpeg. Jpeg is a file extension associated with image files. You'll see different types of file extensions like this when you're working with your operating system.

Process Management
One of the most important tasks that our kernel performs is Process Management. A process is a program that's executing, like our internet browser or text editor. A program is an application that we can run, like Chrome.
We can have many processes of the same program running at the same time. Think of how many Chrome windows you can open. These are all different processes for the same program. When we want to run our programs, we have to dedicate computer resources to them, like RAM and CPU. We only have a finite amount of resources and we want to be able to run multiple programs. A kernel has to manage our resources efficiently, so that all the programs we want to use can be run. Our kernel doesn't just dedicate all of our computers' resources to one process. Our system is actually constantly running multiple processes that are necessary for it to function, so our kernel has to worry about all of these processes at once. What a program wants to run, a process needs to be created for it. This process needs to have hardware resources like RAM and CPU. The kernel has to schedule time for the CPU to execute the instructions in the process. But there's only one CPU and many processes.
How does the CPU able to execute multiple processes at once? It actually doesn't, it executes processes one by one through something known as a time slice. A time slice is a very short interval of time that gets allocated to a process for CPU execution. It's so short that you don't even notice it. The CPU execute one process in milliseconds then executes another process then another. To the human eye everything looks like it runs simultaneously, that's how fast the CPU works. If your computer is running slowly and your CPU resources are being maxed out, there could be many factors at play. It's possible that one process is taking up more time slices than it should. This means that the next process can't be executed. Another possibility is that there are too many processes that want CPU time and the CPU can't keep up with them. Whatever the case may be, even though the kernel does its best to manage processes for us, we might need to step in manually from time to time. The kernel creates processes, efficiently schedules them, and manages how processes are terminated. This is important since we need a way to collect all the previously used resources that active processes were taking up and reallocate them to another process.

Memory Management
Remember that when a process runs, it needs CPU time, but it also needs memory. When processes are run, they have to take up space in memory, so that the computer can read and load them quickly. However, compared to our hard disk drives, memory comes in smaller quantities. So to give us more memory than we physically have, we use something called virtual memory. Virtual memory is a combination of hard drive space and RAM that acts like memory that our processes can use. When we execute a process, we take the data of the program in chunks(덩어리) we call pages. We store these pages in virtual memory. If we want to read and execute these pages, they have to be sent to physical memory or RAM. Why don't we just store the entire program in RAM so we can execute it quickly? Well, you could if it was small enough, but for large applications, it would be wasteful. Have you ever worked in a word processor, and then gone to a menu you don't normally use, and notice the application slow down a little? It's because your computer had to load the page for that menu from virtual memory into RAM.
We don't use all the features of our application at once. So why load it up at once? It's similar to cooking a recipe from a cookbook. You don't need to read the whole book just to make one recipe. You only need to read the pages of the recipe you're currently using. When we store our virtual memory on our hard drive, we call the allocated space, swap space. When we get into practical applications of disk partitioning, we'll allocate space for swap. The kernel takes care of all of this for us, of course. It handles the process of taking pages of data and swapping them between RAM and virtual memory. But, the kernel isn't the only hard worker around.

I/O Management
So far, we've learned how hard our kernel works by handling files, managing files storage, juggling all the different processes running on our computer, and allocating memory. Another important task that our kernel handles, is managing input and output. We refer to devices that perform input and output, as I/O devices. These include our monitors, keyboards, mice, hard disk drives, speakers, bluetooth headsets, webcams, and network adapters. These I/O devices are all managed by our kernel, the kernel needs to be able to load up drivers that are used, so that we can recognize and speak to these different types of hardware. When the kernel is able to start the drivers to communicate with hardware, it also manages the transfer of data in, and out of the devices.
I/O doesn't just mean the transfer of data between us and our devices, the devices also need to be able to talk to each other. Our kernel handles all the intercommunication between devices. It also figures out what the most efficient method of transfer is, and it tries its best to make sure our data doesn't have errors during process. When you're troubleshooting or solving a problem with a slow machine, it's usually some sort of hardware resource deficiency. If you don't have enough RAM, you can't load up as many processes. If you don't have enough CPU, you can't execute programs fast enough. If you have too much input coming into the device or too much output going somewhere, you'll also block other data from being sent or received. It's slow! is one of the most common problems you'll solve in an I.T. support role. Knowing the potential sources of that slowness is a big help when you're trying to narrow down the cause of the latency.

'GCC-Study(完)' 카테고리의 다른 글
[GCC-Study] Networking (1) (0) | 2024.02.17 |
---|---|
[GCC-Study] Operating System (2) (0) | 2024.02.12 |
[GCC-Study] Hardware (2) (0) | 2024.02.05 |
[GCC-Study] Hardware (1) (0) | 2024.02.04 |
[GCC-Study] Technical Support Fundamentals (0) | 2024.01.27 |