Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Computer program
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Functional categories== [[File:Operating system placement (software).svg|thumb|upright|A diagram showing that the [[User (computing)|user]] interacts with the [[application software]]. The application software interacts with the [[operating system]], which interacts with the [[Computer hardware|hardware]].]] ''Computer programs'' may be categorized along functional lines. The main functional categories are [[application software]] and [[system software]]. System software includes the [[operating system]], which couples [[computer hardware]] with application software.<ref name="osc-overview"/> The purpose of the operating system is to provide an environment where application software executes in a convenient and efficient manner.<ref name="osc-overview">{{cite book | last = Silberschatz | first = Abraham | title = Operating System Concepts, Fourth Edition | publisher = Addison-Wesley | year = 1994 | page = 1 | isbn = 978-0-201-50480-4 }}</ref> Both application software and system software execute [[Utility software|utility programs]]. At the hardware level, a [[Microcode|microcode program]] controls the circuits throughout the [[central processing unit]]. ===Application software=== {{Main|Application software}} Application software is the key to unlocking the potential of the computer system.<ref name="pis-ch4-p147_quote1">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 147 | isbn = 0-619-06489-7 | quote = The key to unlocking the potential of any computer system is application software. }}</ref> [[Enterprise application software]] bundles accounting, personnel, customer, and vendor applications. Examples include [[enterprise resource planning]], [[customer relationship management]], and [[supply chain management software]]. Enterprise applications may be developed in-house as a one-of-a-kind [[proprietary software]].<ref name="pis-ch4-p148">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 147 | isbn = 0-619-06489-7 }}</ref> Alternatively, they may be purchased as [[off-the-shelf software]]. Purchased software may be modified to provide [[custom software]]. If the application is customized, then either the company's resources are used or the resources are outsourced. Outsourced software development may be from the original software vendor or a third-party developer.<ref name="pis-ch4-p147_quote2">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 147 | isbn = 0-619-06489-7 | quote = [A] third-party software firm, often called a value-added software vendor, may develop or modify a software program to meet the needs of a particular industry or company. }}</ref> The potential advantages of in-house software are features and reports may be developed exactly to specification.<ref name="pis-ch4-p148_quote1">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 148 | isbn = 0-619-06489-7 | quote = Heading: Proprietary Software; Subheading: Advantages; Quote: You can get exactly what you need in terms of features, reports, and so on. }}</ref> Management may also be involved in the development process and offer a level of control.<ref name="pis-ch4-p148_quote2">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 148 | isbn = 0-619-06489-7 | quote = Heading: Proprietary Software; Subheading: Advantages; Quote: Being involved in the development offers a further level of control over the results. }}</ref> Management may decide to counteract a competitor's new initiative or implement a customer or vendor requirement.<ref name="pis-ch4-p148_quote3">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 147 | isbn = 0-619-06489-7 | quote = Heading: Proprietary Software; Subheading: Advantages; Quote: There is more flexibility in making modifications that may be required to counteract a new initiative by one of your competitors or to meet new supplier and/or customer requirements. }}</ref> A merger or acquisition may necessitate enterprise software changes. The potential disadvantages of in-house software are time and resource costs may be extensive.<ref name="pis-ch4-p148"/> Furthermore, risks concerning features and performance may be looming. The potential advantages of off-the-shelf software are upfront costs are identifiable, the basic needs should be fulfilled, and its performance and reliability have a track record.<ref name="pis-ch4-p148"/> The potential disadvantages of off-the-shelf software are it may have unnecessary features that confuse end users, it may lack features the enterprise needs, and the data flow may not match the enterprise's work processes.<ref name="pis-ch4-p148"/> ====Application service provider==== One approach to economically obtaining a customized enterprise application is through an [[application service provider]].<ref name="pis-ch4-p149">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 149 | isbn = 0-619-06489-7 }}</ref> Specialty companies provide hardware, custom software, and end-user support. They may speed the development of new applications because they possess skilled information system staff. The biggest advantage is it frees in-house resources from staffing and managing complex computer projects.<ref name="pis-ch4-p149"/> Many application service providers target small, fast-growing companies with limited information system resources.<ref name="pis-ch4-p149"/> On the other hand, larger companies with major systems will likely have their technical infrastructure in place. One risk is having to trust an external organization with sensitive information. Another risk is having to trust the provider's infrastructure reliability.<ref name="pis-ch4-p149"/> ===Operating system=== {{See also|Operating system}} [[File:Concepts- Program vs. Process vs. Thread.jpg|thumb|Program vs. [[Process (computing)|Process]] vs. [[Thread (computing)|Thread]] <br/>[[Scheduling (computing)|Scheduling]], [[Preemption (computing)|Preemption]], [[Context switch|Context Switching]]|upright=1.8]] An [[operating system]] is the low-level software that supports a computer's basic functions, such as [[Scheduling (computing)|scheduling]] [[Process (computing)|processes]] and controlling [[peripheral]]s.<ref name="osc-overview"/> In the 1950s, the programmer, who was also the operator, would write a program and run it. After the program finished executing, the output may have been printed, or it may have been punched onto paper tape or cards for later processing.<ref name="osc-ch1-p6"/> More often than not the program did not work. The programmer then looked at the console lights and fiddled with the console switches. If less fortunate, a memory printout was made for further study. In the 1960s, programmers reduced the amount of wasted time by automating the operator's job. A program called an ''operating system'' was kept in the computer at all times.<ref name="sco-ch1-p11">{{cite book |url=https://archive.org/details/structuredcomput00tane/page/11 |title=Structured Computer Organization, Third Edition |last=Tanenbaum |first=Andrew S. |publisher=Prentice Hall |year=1990 |isbn=978-0-13-854662-5 |page=[https://archive.org/details/structuredcomput00tane/page/11 11]}}</ref> The term ''operating system'' may refer to two levels of software.<ref name="lpi-ch2-p21">{{cite book |title=The Linux Programming Interface |last=Kerrisk |first=Michael |publisher=No Starch Press |year=2010 |isbn=978-1-59327-220-3 |page=21}}</ref> The operating system may refer to the [[Kernel (operating system)|kernel program]] that manages the [[Process (computing)|processes]], [[Computer memory|memory]], and [[Peripheral|devices]]. More broadly, the operating system may refer to the entire package of the central software. The package includes a kernel program, [[Command-line interface|command-line interpreter]], [[graphical user interface]], [[Utility software|utility programs]], and [[Source-code editor|editor]].<ref name="lpi-ch2-p21"/> ====Kernel Program==== [[File:Kernel Layout.svg|thumb|A kernel connects the application software to the hardware of a computer.]] The kernel's main purpose is to manage the limited resources of a computer: * The kernel program should perform [[process scheduling]],<ref name="lpi-ch2-p22">{{cite book |title=The Linux Programming Interface |last=Kerrisk |first=Michael |publisher=No Starch Press |year=2010 |isbn=978-1-59327-220-3 |page=22}}</ref> which is also known as a [[context switch]]. The kernel creates a [[process control block]] when a ''computer program'' is [[Loader (computing)|selected for execution]]. However, an executing program gets exclusive access to the [[central processing unit]] only for a [[Preemption (computing)#time slice|time slice]]. To provide each user with the [[Time-sharing|appearance of continuous access]], the kernel quickly [[Preemption (computing)|preempts]] each process control block to execute another one. The goal for [[Systems programming|system developers]] is to minimize [[dispatch latency]]. [[File:Virtual memory.svg|thumb|250px|Physical memory is scattered around RAM and the hard disk. Virtual memory is one continuous block.]] * The kernel program should perform [[memory management]]. :* When the kernel initially [[Loader (computing)|loads]] an executable into memory, it divides the address space logically into [[Region-based memory management|regions]].<ref name="duos-ch6-p152">{{cite book | last = Bach | first = Maurice J. | title = The Design of the UNIX Operating System | publisher = Prentice-Hall, Inc. | year = 1986 | page = 152 | isbn = 0-13-201799-7 }}</ref> The kernel maintains a master-region table and many per-process-region (pregion) tables—one for each running [[Process (computing)|process]].<ref name="duos-ch6-p152"/> These tables constitute the [[virtual address space]]. The master-region table is used to determine where its contents are located in [[physical memory]]. The pregion tables allow each process to have its own program (text) pregion, data pregion, and stack pregion. :*The program pregion stores machine instructions. Since machine instructions do not change, the program pregion may be shared by many processes of the same executable.<ref name="duos-ch6-p152"/> :* To save time and memory, the kernel may load only blocks of execution instructions from the disk drive, not the entire execution file completely.<ref name="lpi-ch2-p22"/> :*The kernel is responsible for translating virtual addresses into [[physical address]]es. The kernel may request data from the [[memory controller]] and, instead, receive a [[page fault]].<ref name="sco6th-ch6-p443">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 443 | isbn = 978-0-13-291652-3 }}</ref> If so, the kernel accesses the [[memory management unit]] to populate the physical data region and translate the address.<ref name="esa-ch1-p8">{{cite book | last = Lacamera | first = Daniele | title = Embedded Systems Architecture | publisher = Packt | year = 2018 | page = 8 | isbn = 978-1-78883-250-2 }}</ref> :* The kernel allocates memory from the ''heap'' upon request by a process.<ref name="cpl-ch8-p187"/> When the process is finished with the memory, the process may request for it to be [[Manual memory management|freed]]. If the process exits without requesting all allocated memory to be freed, then the kernel performs [[Garbage collection (computer science)|garbage collection]] to free the memory. :* The kernel also ensures that a process only accesses its own memory, and not that of the kernel or other processes.<ref name="lpi-ch2-p22"/> * The kernel program should perform [[File system|file system management]].<ref name="lpi-ch2-p22"/> The kernel has instructions to create, retrieve, update, and delete files. * The kernel program should perform [[Peripheral|device management]].<ref name="lpi-ch2-p22"/> The kernel provides programs to standardize and simplify the interface to the mouse, keyboard, disk drives, printers, and other devices. Moreover, the kernel should arbitrate access to a device if two processes request it at the same time. * The kernel program should perform [[network management]].<ref name="lpi-ch2-p23">{{cite book |title=The Linux Programming Interface |last=Kerrisk |first=Michael |publisher=No Starch Press |year=2010 |isbn=978-1-59327-220-3 |page=23}}</ref> The kernel transmits and receives [[Network packet|packets]] on behalf of processes. One key service is to find an efficient [[Routing table|route]] to the target system. * The kernel program should provide [[system calls|system level functions]] for programmers to use.<ref name="upe-ch7-p201">{{cite book |title=The Unix Programming Environment |last=Kernighan |first=Brian W. |publisher=Prentice Hall |year=1984 |isbn=0-13-937699-2 |page=201}}</ref> ** Programmers access files through a relatively simple interface that in turn executes a relatively complicated low-level I/O interface. The low-level interface includes file creation, [[file descriptor]]s, file seeking, physical reading, and physical writing. ** Programmers create processes through a relatively simple interface that in turn executes a relatively complicated low-level interface. ** Programmers perform date/time arithmetic through a relatively simple interface that in turn executes a relatively complicated low-level time interface.<ref name="lpi-ch10-p187">{{cite book |title=The Linux Programming Interface |last=Kerrisk |first=Michael |publisher=No Starch Press |year=2010 |isbn=978-1-59327-220-3 |page=187}}</ref> * The kernel program should provide a [[Inter-process communication|communication channel]] between executing processes.<ref name="usp-ch6-p121">{{cite book |title=Unix System Programming |last=Haviland |first=Keith |publisher=Addison-Wesley Publishing Company |year=1987 |isbn=0-201-12919-1 |page=121}}</ref> For a large software system, it may be desirable to [[Software engineering|engineer]] the system into smaller processes. Processes may communicate with one another by sending and receiving [[Signal (IPC)|signals]]. Originally, operating systems were programmed in [[assembly language|assembly]]; however, modern operating systems are typically written in higher-level languages like [[C (programming language)|C]], [[Objective-C]], and [[Swift (programming language)|Swift]].{{efn|The [[UNIX]] operating system was written in C, [[macOS]] was written in Objective-C, and Swift replaced Objective-C.}} ===Utility program=== A [[utility program]] is designed to aid system administration and software execution. Operating systems execute hardware utility programs to check the status of disk drives, memory, speakers, and printers.<ref name="pis-ch4-p145">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 145 | isbn = 0-619-06489-7 }}</ref> A utility program may optimize the placement of a file on a crowded disk. System utility programs monitor hardware and network performance. When a metric is outside an acceptable range, a trigger alert is generated.<ref name="pis-ch4-p146">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 146 | isbn = 0-619-06489-7 }}</ref> Utility programs include compression programs so data files are stored on less disk space.<ref name="pis-ch4-p145"/> Compressed programs also save time when data files are transmitted over the network.<ref name="pis-ch4-p145"/> Utility programs can sort and merge data sets.<ref name="pis-ch4-p146"/> Utility programs detect [[computer virus]]es.<ref name="pis-ch4-p146"/> ===Microcode program=== {{main|Microcode}} [[File:Not-gate-en.svg|thumb|96px|right|NOT gate]] [[File:NAND_ANSI_Labelled.svg|thumb|96px|right|NAND gate]] [[File:NOR_ANSI_Labelled.svg|thumb|96px|right|NOR gate]] [[File:AND_ANSI_Labelled.svg|thumb|96px|right|AND gate]] [[File:OR_ANSI_Labelled.svg|thumb|96px|right|OR gate]] A [[Microcode|microcode program]] is the bottom-level interpreter that controls the [[data path]] of software-driven computers.<ref name="sco6th-ch1-p6">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 6 | isbn = 978-0-13-291652-3 }}</ref> (Advances in [[Random logic|hardware]] have migrated these operations to [[Control unit#Hardwired control unit|hardware execution circuits]].)<ref name="sco6th-ch1-p6"/> Microcode instructions allow the programmer to more easily implement the [[Logic level|digital logic level]]<ref name="sco6th-ch4-p243">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 243 | isbn = 978-0-13-291652-3 }}</ref>—the computer's real hardware. The digital logic level is the boundary between [[computer science]] and [[computer engineering]].<ref name="sco6th-ch3-p147">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 147 | isbn = 978-0-13-291652-3 }}</ref> A [[logic gate]] is a tiny [[Field-effect transistor|transistor]] that can return one of two signals: on or off.<ref name="sco6th-ch3-p148">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 148 | isbn = 978-0-13-291652-3 }}</ref> * Having one transistor forms the [[NOT gate]]. * Connecting two transistors in series forms the [[NAND gate]]. * Connecting two transistors in parallel forms the [[NOR gate]]. * Connecting a NOT gate to a NAND gate forms the [[AND gate]]. * Connecting a NOT gate to a NOR gate forms the [[OR gate]]. These five gates form the building blocks of [[Boolean algebra|binary algebra]]—the digital logic functions of the computer. Microcode instructions are [[Assembly language#Mnemonics|mnemonics]] programmers may use to execute digital logic functions instead of forming them in binary algebra. They are stored in a [[central processing unit|central processing unit's]] (CPU) [[control store]].<ref name="sco6th-ch4-p253">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 253 | isbn = 978-0-13-291652-3 }}</ref> These hardware-level instructions move data throughout the [[data path]]. The micro-instruction cycle begins when the [[microsequencer]] uses its microprogram counter to ''fetch'' the next [[machine instruction]] from [[random-access memory]].<ref name="sco6th-ch4-p255">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 255 | isbn = 978-0-13-291652-3 }}</ref> The next step is to ''decode'' the machine instruction by selecting the proper output line to the hardware module.<ref name="sco6th-ch3-p161">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 161 | isbn = 978-0-13-291652-3 }}</ref> The final step is to ''execute'' the instruction using the hardware module's set of gates. [[File:ALU block.gif|thumb|right|A symbolic representation of an ALU]] Instructions to perform arithmetic are passed through an [[arithmetic logic unit]] (ALU).<ref name="sco6th-ch3-p166">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 166 | isbn = 978-0-13-291652-3 }}</ref> The ALU has circuits to perform elementary operations to add, shift, and compare integers. By combining and looping the elementary operations through the ALU, the CPU performs its complex arithmetic. Microcode instructions move data between the CPU and the [[memory controller]]. Memory controller microcode instructions manipulate two [[Processor register|registers]]. The [[memory address register]] is used to access each memory cell's address. The [[memory data register]] is used to set and read each cell's contents.<ref name="sco6th-ch4-p249">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 249 | isbn = 978-0-13-291652-3 }}</ref> Microcode instructions move data between the CPU and the many [[computer buses]]. The [[Disk controller|disk controller bus]] writes to and reads from [[hard disk drive]]s. Data is also moved between the CPU and other functional units via the [[PCI Express|peripheral component interconnect express bus.]]<ref name="sco6th-ch2-p111">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Sixth Edition | publisher = Pearson | year = 2013 | page = 111 | isbn = 978-0-13-291652-3 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)