for Robot Artificial Inteligence

27. Operating System Management

|

Operating System Management

  • in computer programming, a process is an instance of a computer program that is being currently executed.

  • A computer program is a passive collection of instructions, while a process is the actual execution of those instruction when operating system allocates the resources(Memory & processor time). several processes may be associated with the same program.

  • For example : a user may working on number of MS word documents simultaneously.

  • A process can be user application program Or system process. operating system is responsible to manage both these processes.

  • A multitasking operating system rapidly switches the CPU execution time between the different processes currently being executed. although, CPU executes only one process at a time but due to switching it creates an illusion that all programs(processes) are running simultaneously but that is not the case

  • the process management is an important function managed by the operating system. the CPU can execute only one process at a time. therefore, operating system has to decide the schedule for process, order of execution for different processes at various stages and the CPU time to be allocated.

  • the program execution needs resources in terms of memory and the CPU’s processing time. the operating system manages the memory of the computer system by allocating main memory to different process currently under execution at various stages.

  • the main memory of also needs to be reallocated from the process that is already terminated. memory is an important limited resource and operating system manages this by allocation and reallocating the memory from terminated process to the new processes

  • A file is a collection of related information. A file can be text file, image, audio, video and many more.

  • the data is represented in a computer system only in a binary form. the data is stored permanently in a secondary storage devices such as hard disk

  • this data is physically stored in hard disk in two states(for magnetic tapes it is south and north poles) which can be represented in the binary form in a computer system.

  • the operating system is responsible for the following activities in connection with file management.

    • File creation and deletion
    • Directory creation and deletion
    • Support of primitives for manipulating files and directories
    • Mapping files onto secondary storage
    • File backup on stable(Non-volatile) storage media.

  • one of the important responsibility of the operating system is to provide secure and protected runtime environment to the various process(both applications process & system processes) which are being executed on the computer system.

  • the system security is another important aspect which is handily by the operating system. protecting system against unauthorized access can be implemented by activating different security features of the operating system.

  • A command interpreter is a program which reads the instructions given by the user. it then translates these instructions into the context of the operating system followed by the execution. command interpreter is also known as “shell”

  • A command interpreter is the part of a computer operating system that understand and executes commands that are entered interactively by a user or from a program.

  • A command interpreter is an interface between system and the user. there are two types of user interface:
    • command line interface
    • Graphical User Interface(GUI)

Comment  Read more

27. Operating System Functions

|

Operating System and operation modules

  • A computer system can be designed to operate in different modes in terms of number of users working on the machine at the same time, number of processors used, data handling and the number of applications running simultaneously on the same computer system.

  • A computer system needs to be configured accordingly and the system will also need the operating system which can support such operations.

  • in batch processing the processing transactions(交易) are executed in a group or batches. No user interaction(相互影响) is required one batch processing in underway.

  • the next batch is taken for processing only after the first batch is completed this often lead to CPU processing time is not optimally utilized

  • Example : IMB : OS2

  • Multi tasking allows more than one program to run concurrently.
  • the tasks share common processing resources, such as a CPU time and main memory.
  • in multi tasking process, only one CPU is involved but it switches from one program to another so quickly that it gives an illusion of executing all the programs at the same time.

  • the multi processor processing makes use of more than one processor in a same system to enhance the system performance. Due to number of processor the system performance is significantly improved. however, all the processes share the same common main memory(RAM)

  • A computer system with multi processor needs operating system which can support multiple programs execution simultaneously

  • A real-time operating system(RTOS commonly pronounced as “are-toss”) is a multitasking operating system designed for real-time applications. Such applications include embedded systems, industrial robots, scientific research equipment and others.

  • A real-time computing guarantees response within specific time limits and thus suitable for quick reaction system.

  • Hard Real-time operating systems
    • Meets deadlines with zero degree of flexibility
    • Missed deadlines cause catastrophe(灾难)
    • Cost of catastrophe is high
  • Soft Real-time operating system
    • Meets deadlines with some degree of flexibility
    • Missed deadlines does not cause catastrophe
    • cost rise in proportion of the delay
  • the real-time systems are sued in the situations where a large number of events(generally external to the computer system) are required to be accepted and processed in the form of quick response. such systems should be a multitasking system.

  • Almost all the modern telecommunication systems make use of RTOS
  • Radar systems, network switching control system, satellite monitoring system, satellite launch-control and manoeuvring(手段) mechanisms, global positioning system all have their operational dependence on RTOS

  • Now a days RTOS is increasingly finding use in strategic and military operations. there are used in guided missile launching units, track-and-trace spy satellite

  • Multi user operating system is a computer operating system(OS) that allows multi users to access a single system with one OS managing the computer system.

  • Each user is given a separate login credentials and more than one user can simultaneously use the computer system. each user will have their own settings.

Comment  Read more

26. Operating System architecture

|

Operating System architecture

  • An operating system structure(OS design approach/architecture) can be classified based on the design approach and implementation by the operating system.

    • simple structure OS
    • layered approach OS
    • Monolithic Approach OS
    • Microkernel Approach OS

Monolithic((组织或体系) 庞大而僵化的) Kernel Design

  • A kernel is the central part of an operating system with unrestricted access to all system recourses. it manages the tasks of the computer software and the hardware(most notably(特别) Memory RAM and CPU processing time).

  • there are two types of kernels:

    1. A Microkernel : which contains only basic functionality
    2. A Monolithic Kernel : which contains many drivers
  • A computer user never interacts directly with the kernel. the kernel run behind the scenes and user interact with OS GUI interface OR through a command line.

  • The kernel is the most fundamental part and core an operating system. we can think of kernel as the system program which controls all other application program running on the computer system.

  • when the computer starts, it goes through some initialization(booting) function, such as checking memory. the kernel handles all the system recourses such as main memory RAM and CPU processing time. the kernel is responsible for allocating and reallocating the system memory which allows application programs to run.

  • the early kernel designs were based on monolithic architecture in which each component of the operating system was contained within the kernel. Applications could communicate directly with any internal component of the operating system and had unrestricted system access. this kind of layered design was perceived(注意到) to be efficient but prone(易于遭受) for crash.

  • the core software components of an operating system are collectively known as the kernel. the kernel has unrestricted access to all the system resources of a computer system.

  • in monolithic architecture, each layer communicates only with the layer immediately above and below it. the lower-level layers provide services to higher-level ones using an interface that hide their implementation

  • although from efficiency point of view the monolithic kernel will perform very well as such operating systems implementing monolithic kernel will be very efficient.

  • the most important drawback of the monolithic kernel is the inability(无能) to isolate the other components in the event if one such component crashes endangering the entire system to crash. thus there was a high risk of damage due to erroneous of malicious(恶毒的) code

  • the summarize, the core components of the operating system are collectively referred as kernel. the kernel has unrestricted access to all the system resources. the kernel also handles all the crucial tasks performed by the operating system.

  • in computer endangering, computer architecture is a set of rules and methods that describes the functionality, system design specifications, organization and implementation details of a computer systems.

  • A computer architecture is a design specifications detailing how a set of software and hardware technology standards interact to form a computer system or a platform. in short, computer architecture refers to how a computer system is designed and what technologies it is compatible with.

  • An operating system is an essential component of the computer system. it is a system program which provides services, resources and runtime environment for application programs running on the computer system.

  • An operating system architecture is a term that specifies the overall structure of the operating system, its logical components and the logical interrelationships of various components that constitute an operating system.

Microkernel Design

  • A Microkernel architecture includes only a very small number of bare minimum essential services within the kernel area as an attempt to keep it small, protected and scalable.

  • the services within Microkernel area typically include the low-level memory management, inter-processes communication and basic process synchronisation to enable processes to cooperate.

  • as compared to a typical kernel, a Microkernel is designed to be compact and performing only the basic functions universal to all computer systems.

  • the Microkernel are designed to be intergraded into different operating systems. therefore, Microkernel are highly modular which makes them protected, extensible, portable and scalable.

  • in Microkernel designs, most operating system components such as process management and device management are placed outside kernel area which execute outside the kernel within a user area with lower level of system access.

  • the Microkernel design OS is considered to be more stable as the device drivers are moved out to the user space so that OS crash could be avoided in the event of faulty drivers.

  • in a Microkernel operating system, the OS kernel deals only with the critical activities such as controlling the memory allocation and CPU processing time and nothing else.

  • Drivers and other functions that monolithic kernels would normally do within the kernel area are moved outside the kernel area to the user area, where they are under control.

  • in Microkernel architecture, the operating system components placed outside the kernel area can fail without causing the entire operating system to crash.

  • however placing operating system components outside the kernel area affects the performance and the downside is an increased level of inter-module communication which can degrade system performance

  • to summarize, the core components of the operating system are collectively referred as kernel. the kernel has unrestricted access to all the system resources. the kernel also handles all the crucial tasks performed by the operating system.

Comment  Read more

11.Binary Search - Finding first or last occurrence of a number

|

#include <bits/stdc++.h>
#include <iostream>
using namespace std;

int Binarysearch_(int M[], int n, int k, int flag)
{
    int left = 0;
    int right = n-1;
    int mid;

    int result = -1;
    while(left<=right)
    {
        mid = (left+right)/2;
        if (k==M[mid])
        {
            result = mid;
            if (flag == 1) right= mid-1;
            if (flag == 2) left = mid +1;
        }
        else if (k<M[mid]) right = mid - 1;
        else left = mid+1;
    }
    return result;

}

int main()
{
    int A[] = {1,1,1,3,3,3,3,3,3,3,5,6,6,8,9,9};

    int n = sizeof(A)/sizeof(A[0]);
    // 1 == firstOccurance
    // 2 == LastOccurance
    int firstOccurance = Binarysearch_(A,n,3,1);
    int lastOccurance = Binarysearch_(A,n,3,2);

    if(firstOccurance==-1)
    {
        cout << "the element is not in the array";
    }else
    {
        cout << "the element appears "<<lastOccurance-firstOccurance + 1;
    }
    return 0;
}

Comment  Read more

현대 H-Experience 자율주행 센서퓨전 개발 면접 후기

|

노동절날 웨이하이에서 휴가를 즐기는 도중, 현대 H-Experience라는 연구 인턴쉽을 보게 되었다.

내가 지원한 분야는 [연구인턴] 자율주행 센서 퓨전 기술 개발이다.

센서퓨전 연구한 경험도 있고 센서퓨전에 대한 논문이 때마침 5월 3일에 IEEE/AIM Conference로부터 Contribution paper 통과가 되어서 자신감 있게 썻다.

자소서 항목으로는 아래와 같았다.

  • 나 자신을 하나의 자동차(브랜드 무관)에 비유하여 설명해주고, 이번 Global Intership(H-Experience)를 통해 얻고 싶은 목표를 서술
    • 남들과 다른 유닉한 존재가 되고자함을 썻으며, 그런 브랜드는 테슬라로 비유하였다.
    • 나만의 차별화된 전략은 3개국어(중국어,영어,한국어)를 구사할줄 아는 엔지니어로, 중국어,영어,한국어 논문을 읽고 이해할 수 있다.
    • 또한 언어 뿐만 아니라 엔지니어 역량을 갖춤을 보여줬다(공모전 수상, 논문 통과)
    • 얻고자 하는 바로 제 역량을 키우고, 능력을 기부하여, 현대자동차 연구 및 개발에 보탬이 되고, 업계 선배들로부터 인정 받고 싶다고 썻다.
  • 해당 직무를 선택한 이유와 본인이 본 분야에 적합하다고 판단할 수 있는 근거 서술
    • 연구 주제에 대해서 설명하였다. Asynchronous Fusion of Visual and Wheel Odometer for SLAM Application
    • 대학원 시절 배운 수업들을 서술하였다.
    • 연구실 프로젝트 경험을 서술하였다.
    • 위와 같은 지식과 센서 퓨전 개발 경험을 통해 업무에 대한 빠른 이해로 프로젝트를 수행하는데 적합하다고 판단되어 지원하게 되었다고 하였다.
  • 본인의 장점 및 직무 역량을나타내고, 해당 경험을 통해 체득한 장점 및 직무 역량을 간단하게 서술.
    • 중국에서 석사 생활하면서 영어, 중국어, 한국 논문 원서를 읽는데 익숙한것이 장점
    • 연구실 프로젝트 책 꽃이 로봇 개발 참여(Object Dection) 개발 경험
    • 센서퓨전 개발 경험
    • 졸업논문으로 Fast Frontier based autonomous exploration Mobile robot
    • ROS 시스템 개발 경험

그리고 얼마 지나지 않아 (약 3일~4일) 서류 합격에 대한 발표가 났고, 증빙서류와 증명서, 온라인으로 인성검사를 진행하였다.

그리고 면접을 보았다.

  • 자기소개
    • 소속, 이름, 연구 주제, 취미 이렇게 얘기하였다.
  • 로봇에 대해 연구하였는데 자율주행에 잘 아시는지
    • 아마 로봇이든 자율주행이든 크게 차이가 없을 것이라 생각한다.
  • 로봇과 자율주행 차량에 대한 차이가 무엇인지
    • 데이터 처리양과 센서의 양이라 생각한다. 그리고 로봇같은 경우 동적환경에 대한 제약 조건이 자율주행차량의 제약조건보다 훨씬 좋으므로, 센서의 사용이 자율주행 차량 보다 적다.
  • 자율주행에 센서가 어떻게 사용되고 있는지
    • 자율주행 센서는 사람의 피부같은 역할 눈과 같은 역할을 하므로, 물체를 감지하고 예측하는데 쓰입니다.
  • 연구하신 내용 설명
    • ORB-SLAM2 와 yolov3를 합쳐 Semantic Slam에서 구해지는 Visual odometery를 이용하여 mecanum 휠로부터 얻어지는 wheel odometery를 융합하였습니다.
    • EKF에 대한 설명(Prediction, Correction) 파트
  • 학교에서 배운 내용중에 센서 퓨전 하는데 있어 도움 된적이 있는 과목
    • Digital signal process, 머신 비전, Optimization Method등 도움이 되었습니다.
    • Digital Signal Process에서 프로젝트 하였는데, 노이즈를 제거하여 좋은 데이터를 뽑아내는 것을 하였고
    • 머신 비전으로써는 Computer Vision을 배워 SLAM을 이해하는데 도움이 되었으며
    • Optimization Method를 통해 EKF에 대해 쉽게 이해할 수 있었습니다.
  • SLAM을 어떻게 공부하였는지
    • 유투브를 통해서 공부를 하였고
    • SLAM KR 커뮤니티에 들어가서 공부를 하였고 사람들과 소통하였습니다.
  • Lidar 사용해본 경험? RGB-D 카메라랑의 차이점
    • Lidar를 사용해본적은 없습니다. 개인적인 생각에는 RGB-D보다 범위가 크고 물체에 대한 거리를 보다 정확하게 얻어진다고 생각합니다.
  • 컴퓨터 언어는 어떤거 쓰시는지
    • C++와 Python을 씁니다.
  • 중국, 미국, 한국 자율주행 미래
    • 중국이 자율주행 기술을 선도하는 것은 시간문제라 생각합니다.
    • 그 이유중에 이미 중국의 일부분은 Mobility 로봇들이 자율주행으로 물건을 옮기고 있으며
    • 우리나라 5000만 명중 1000명이 자율주행에 관한 엔지니어 공부를 한다면
    • 비율로 보았을때 중국 인구 14억인구 중 14만 인구가 자율주행에 관한 연구를 하고 있기 떄문에, 이미 연구에 대한 발전이 빠릅니다.
    • 미국 실리콘 벨리에서 개발되는 자율주행 소프트웨어가 많지만, 중국의 이런 인구들로 인하여 따라잡히는것은 시간문제라고 생각됩니다.

약 30분동안 면접을 보았는데, 사실 네트워크가 계속 끊켜서 제대로된 면접이라고 할 수 없었다.

또한 내 태도도 그렇게 좋지 못하였다, 답변하는데 계속 아, 혹은 어, 라는 말을 많이 하였으며

내가 말하면서도 정리되지 않은 뇌피셜들을 말하였기 때문에 내가 면접관이라도 확실하게 뽑아야 겠다라는 생각은 안들 것 같다.

동등한 실력과 경험의 지원자가 있다며 아마 그 지원자가 뽑혀도 전혀 이상하지 않을 만큼 나의 면접은 좋지 못하였다.

Comment  Read more