Opening a Folder from a Terminal on Mac

Terminal in Mac is like the Command Prompt in Windows where one can access directories and sub directories. Sometimes when you are in the middle of some level of the directory structure, you might want to take a look at the folder.

In order to open the current folder from the terminal, one would have to type this command-

open .

Screen Shot 2018-02-05 at 6.43.48 PM.png

Advertisements

Windows-Find out your Product key

There might be many reasons one would like to know the product key installed in a Windows PC. And luckily it is not too difficult to find that out. Here are the steps which would allow you to do it-

  1. Do Ctrl + X
  2. Scroll up and select Command Prompt (Admin)
  3. On the cmd, type wmic path softwarelicensingservice get OA3xOriginalProductkey

Once you type that of would give you the product key installed.

Windows 10- finding whether Operating System is 32 bit or 64 bit

Windows 10 is the most recent platform from Microsoft. And as Windows gets a newer version of the Operating System, it becomes more easier to find whether your Operating System is 32 bit or 64 bit.

It just takes two simple clicks! Here are the steps-
1. Do  win + X

2. Choose System

And that’s it. This would allow you to determine whether your Operating System is 32 bit or 64 bit.

Semaphores

This is a concept pertaining to Operating Systems and it is extensively used during the development and functioning of it. It is based on the Idea of locking and unlocking.

Now, tell me why do we lock doors once we are leaving the house or after we park the car in the parking lot? Think about it..

We don’t want unauthorized people to barge into our house or take away our car. We do this because it is something we “own” and we don’t want any other person to access it illegally. Taking that into account, suppose we sell our car and exchange it for a newer car. Now, we are not bothered about the locking status of the car since we don’t “own” it. The car might now have another owner who is taking care of it.

Now, let’s see how we can understand this concept from the Operating Systems point of view. Before we move on further, let me give you a small mapping which would help you understand this concept better.

Resource -> Something which is useful . Eg-Car

Process-> Person

Semaphore is a variable which is used during the locking or unlocking of a resource. Whenever a process is using a resource it locks it so that no other process can access that resource during that period of time. It locks it by setting the value of the variable to zero, indicating that the resource is not available at the moment. Whenever the process has finished using the resource, it sets the value of the Semaphore to 1, indicating that the resource is now available for use.

Semaphores come into play while creating multi-threaded applications. Multi -threading means many processes. So, there are situations where many processes want to access the same resource at a given point of time. Semaphores help in resolving this Issue.

For Example-Servers are multi-threaded since they are able to handle and process many requests at a given point of time.

 

Synchronization

“Syncing” is a common term which you may have come across very often. Like syncing information or data across different devices or the cloud. Syncing in this context means having uniformity across different platforms. Let’s take an example, suppose we have some music stored in the cloud and we want that music in one of the devices. Now, in this case the cloud has some Information (music) and the device does not have that. Once we start the process of syncing, there will be a transfer of Information from the cloud to the device. And in the end you will find that the Information (music) in the cloud and the device are balanced ie. they are the same. Biology students might relate this to Osmosis. That is flow of molecules from higher concentration to lower concentration. In Computer Science, we have the concept of Synchronization in the field of Operating Systems.

In Operating Systems we have something known as Process synchronization. It is used when multiple processes try to access the same resource. Synchronization provides a way in which each process gets an equal opportunity to access that resource.

 

Persistence

Persistence is quite a common term used in the English Language. It is used to refer to a quality or trait .That is someone who consistently strives to do something in order to achieve a particular goal or task. And in most cases this attribute is said to stand in good stead. The field of Computer Science and Operating Systems also has something called as Persistence. Whether the meaning of persistence in Computer Science is similar to that of the English Language remains to be seen.

In Computer Science, persistence means a resource which exceeds it’s normal/original life term and continues to exist in the system. An example for such kind of resources would be,  the resources which exist in the Hard Disk of the Operating System. As you would all know, the contents residing in the hard disk or the secondary storage memory are non volatile and continue to “exist” even after the computer or the system is turned off. This shows that the resource is “persistent” to stay alive and not go away after it is turned off.

Virtual Memory

Have you ever wondered how are you able to continuously launch applications one  after the other without the RAM saying “Stop!! I can’t take it anymore!”. This is one of the features which is very understated in an operating system. It is something which happens in the background and the end user never realizes it.

Today we are going to get a brief insight of Virtual Memory. It is the memory which is transferred from the RAM to the ROM  or the hard disk. Now why would the Operating System do that? The operating system has a limited amount of RAM or Primary storage memory. And once this memory get’s almost full, the memory  it is temporarily transferred to the secondary storage ROM.

Now, who is responsible for the transfer of memory? It is a resource known as MMU, which is an abbreviation for Memory Management Unit.

We will learn more about MMU and what it does later. Until then see you next time!