Communication between Windows console and GUI programs is not a problem ....

Source: Internet
Author: User

A recently annoying problem is that you need to write an application, which is a GUI. Instead, you need to call a previously written console application (which may be written in C or Java). I have been exploring for a long time, I know how to start the console in the GUI, But it's troublesome. How can I interact with each other? I want to think about it. It's also about inter-process communication. I reviewed the methods of inter-process communication, but I still haven't found a way to solve the problem. Later, I saw that the first person on the Internet also encountered this problem. It was implemented by pipeline pipe and redirected the standard input and output, so I want to know how standard input and output are implemented in the operating system (especially for Windows), because there are not so many windows bending channels in the embedded operating system and there are so many isolation layers, it is a rectal sub-operating system. I like this kind of direct and transparent system. Instead of doing a lot of things behind you like windows, I directly access the hardware buffer in an embedded system, I think in windows, the buffer should also be written after the 9th 18 th bend, but what is the 9th bend in the middle? How does one distribute keyboard input and output based on different processes? How does the hardware buffer of the keyboard transmit data to the upper layer? As a result, I/O was mainly used for reading relevant materials on msdn. Later, Win32 subsystem became more and more, and I felt that I was working at the same time. I wanted to do a job, looking for the relevant information, it gradually spreads to a lot, and it seems that it took a lot of time to move further and further, and did not focus on the original job: (run the question, huh, huh. later, I saw a piece of information about Windows NT architecture on the Internet, which is comprehensive. I only read a part of it for the time being. However, it seems that at the beginning of the NT design, it was ambitious. the design objectives are as follows:

Design goals

Extensibility: Easy support for new hardware devices was placed in the first place. It seems that flexibility is the most important thing.

Portability: Ability to move the OS to different hardware platforms with minimal effort. portability is also very important. People all want to reuse it, saving money and saving effort.

(

  • Windows NT code is modular. I have never seen the source code of the operating system, but the SDK and MFC frameworks are still consistent.
  • Majority of the Code is written in C and C ++. Do not doubt this.
  • NT contains a hardware isolation action layer (HAL) that provides isolation from the hardware isolation
  • NT runs on Intel x86, MIPS, and Alpha platforms hardware platforms seem to have amd x86 hardware platforms.

)

Reliability: Robustness of the system to hardware, application, and user errors. achieved through:

  • Isolation of applications from other applications
  • Isolation of applications from the kernel (core of the OS ).
  • A file system (NTFs) capable of recovering from all types of errors including critical disk errors.
  • Use of redundant storage (Disk partitioning ing) and transaction-based schemes for data storage.
  • Reliability also seems to be a major focus, but it will also lead to a reduction in efficiency, and there are so many intermediate layers that need to be converted into multiple turns, so it is easy to confuse people.

    Compatibility: Ability to execute programs written for other OSS or earlier versions of the same OS.

    Achieved through:

    Protected subsystems where different OSS can run in isolation.

    Compatibility with OS/2, MS-DOS, and IEEE POSIX (Portable Operating System Interface for computer environments) compatibility, because this introduces several subsystems, It is a layer of conversion

    Security: Protection against unauthorized use of local and network accessible resources,

    Achieved through:

  • A security reference monitor.
  • Access tokens
  • Owner and group identifiers
  • System access control lists (SACLS)
  • Discretionary access control lists (DACLs)
  • Security, always hurt .....

    Performance: Fast response times through good utilization of system resources.

    Achieved through:

  • True 32-bit architecture
  • Local Procedure Call (LPC) mechanic
  • Optimization of critical processes such as system CILS and Page Fault Handling
  • Critical elements of Windows NT networking software built-in into the privileged portion of the OS.
  • How can the multi-layer conversion achieve performance?

    Design specifications based on the target features:

    Windows NT architecture Main Features

    • Preemptive multitasking

    • Support for semantic Ric multiprocessing (SMP)

    • Integrated networking services

    • Support for 2 Gbyte linear address spaces for applications and 2 Gbyte address space for the OS.

    • Support for several file systems

    • Client/Server Architecture

    I went here today, and later I saw it again .......

     

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.