I/O Redirection Operators Redirecting stadard output: >Usage: command > filenameRedirects the standard output to a file rather than the screenCreates the new destination fileif the file already exists, it will be overwritten with the data in the standard output이미 내용이 있거나, 이미 존재하는 파일이라면 기존의 내용은 사라지고 새로운 내용을 덮어씁니다E.g., ls > foo.txtCauses the shell to load and execute ls program, with standard outp..
[학교 수업]
Combinatorial Optimization (CO) Many computer science problems deal with the choice of a best set of parameters to achieve some goalExamplePlacement and routing problem in VLSI designThe traveling salesman problem굉장히 복잡한 해공간을 갖는 문제 Approaches to CO Heuristic search (Informed Search)Using a function that evaluates the quality of assignment, for example, the number of constraints violated by the a..
Zero-Sum Games and AI A player's utility gain or loss is exactly balanced by the combined gain or loss of opponents → 어느 한 플레이어에게 이득인것은 반대편 플레이어에게는 손해여야한다.This is a powerful concept important to AI development for measuring the cost/benefit of a particular moveNash Equilibrium Games and AI Traditional strategy - Minimax:Attempt to minimize opponent's maximum reward at each state (Nash Equilibriu..
Memory mapped I/OAllows an application to map a file into memoryProgrammers can access the file directly through memory어떤 file들을 메모리 공간에 mapping시켜서 pointer들으로 접근할 수 있게 해준다. mmap void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset)Maps len bytes of the object represented by the file descriptor fd, starting at offset, into memoryaddrOffers a suggestion to the kernel of whe..
File descriptorRegular filesSpecial filesCharacter devices (e.g., Keyboard)Block devicesPipesSockets우리가 평소에 다루던 진짜 file들은 Regular file들이고, Character devices나 pipe와 같은 file들을 Special file들이라 부른다. 그리고 Multiplexed I/O는 special file들에 유용하게 쓰인다. A signle process cannot reasonably block on more than one file descriptor at the same timeif a read() system call is issued, and there is not yet any data, t..
Traversal Visit Nodes of a Graph in SOME orderMay go through a node several timeWhile doing calculation Any order traversalStart at a node s (put s into BOX)while BOX is not empty:Take one node from BOXIf node not Marked:Mark nodeDo computation on nodeput Every Adjacent node This solves ReachabilitySolution: start at s, check if t was visited with any order traversal Proof (귀류법) 위에서 제시한 any orde..
Process Specification shows process details which are implied but not shown in a DFDSpecifying the input, output, and algorithm of a module in a DFDNormally written in pseudo-code or table formatSpecifying all (upper/lower) processes in DFD hierachies프로세스 스펙 또한 DFD, SA에 포함되어야한다. 이는 DFD에 나타나지 않은 프로세스의 디테일을 보여준다. Example: Left Sensor Interface Data Dictionary Defines data elements to avoid differe..
File Offset Location in the file at which the next read() or write() will commenceExpressed as an ordinal byte position relative to the start of the fileThe first byte of the file is at offset 0Set to point to the start of the file when the file is openedAutomatically adjusted by each subsequent call to read() or write()Successive read() and write() calls progress sequentially through a file Rep..